开发者

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];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜