开发者

presentModalView not showing up

In my view controller, I have:

- (void)viewDidAppear:(BOOL)animated
{

        LoginViewController* lvc = [[LoginViewController alloc] init];
        lvc.delegate = self;
        [self presentModalViewController:lvc animated:NO];
        [lvc release];

}

However, this doesn't show up. What might be the possibilities? I tried to do a NSLog i开发者_运维技巧nside and it prints out.

Here's how I wire it up:

presentModalView not showing up

This is a UISplitView application where I put this code inside a RootViewController


Did you link the View to the LoginViewController in IB? That's the most common issue...


If logging your navigationController does not give you nil, then try the following:

[self.navigationController presentModalViewController:lvc animated:NO];


You are probably creating your LoginViewController correctly. Try replacing:

LoginViewController* lvc = [[LoginViewController alloc] init];

with

LoginViewController* lvc = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];

You need to specify which NIB to load the view controller from.


It turns out that I have a conflicting code in my UIDetailView, which is trying to do another popup...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜