Take the 2-minute tour ×

From one UIViewController I call an another UIViewController

FullScreenViewController *anotherViewController = [[FullScreenViewController alloc] initWithNibName:@"FullScreenViewController" bundle:nil];

UIView *theWindow = [currentView superview];

[theWindow addSubview:newView];

On the opened FullScreenViewController, I want to put an UIButton to call a method inside the parent UIViewController.

There's a way to do that? How should I proceed?


share|improve this question
add comment

1 Answer

You could pass a unretained reference to the child view controller during its construction (by passing in self in the parent), which the child could use to call methods on it's parent.

Better still you could make the parent a delegate of the child: How do I create delegates in Objective-C?

share|improve this answer
add comment

Your Answer


