开发者

Modal View issue with tab bar controller

I have a tab bar controller and when loading the tab bar controller what I want to do is to load a registration page. Here is my code for this.

    RegistrationScreen *registrationScreen = [[RegistrationScreen alloc] initWithNibName:@"RegistrationScreen" bundle:nil];
    [self.tabBarController presentModalViewController:registrationScreen animated:FALSE];       
    [registrationScreen release];

This works fine. But in my registration page i have a another view which is a read me. I need to load this as another modal view once you click a link in the registration page. However this not triggered. What am I doing wrong here? What should I do to load multiple views o开发者_如何转开发n top of tab bar controller?

Thank you


Since RegistrationScreen is a modal view controller, it shouldn't have self.tabBarController or self.navigationController. You can check yourself with NSLog or similar.

It should have self.parentViewController.

inside RegistrationScreen.m try:

[self.parentViewController.tabBarController presentModalViewController:xxxx]

or

[self presentModalViewController:xxxx]

depending on how your flow works.


TabBarController is declared in AppDelegate file. But I don't know how to use this to present modal view in one of the tab bar viewControllers? [self.parentViewController.tabBarController presentModalViewController:xxxx]

My source code link is here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜