iPhone - sending an action from one UIViewController to another?
I have a login view controller that appears only if a user is not logged-in.
开发者_C百科After being logged-in, the view is removed.
My question: how would I send an action to the view controller that requested the login view?
You may want to consider delegation or a target-action approach. In the end you will give the login view some information about your view controller so that it will be notified once login is complete.
Ex.
//Your view controller
loginView.delegate = self;
...
//loginView code
-(void)loginComplete
{
[self.delegate loginComplete:self];
}
精彩评论