开发者

How to know which viewController is on navigation controller?

开发者 https://www.devze.com 2023-04-03 03:23 出处:网络
I\'m following a tutorial for Facebook connect, all is fine. The problem is that I\'m doing it programatically, and in one part according to the view controller from a nib, something happens.

I'm following a tutorial for Facebook connect, all is fine. The problem is that I'm doing it programatically, and in one part according to the view controller from a nib, something happens.

if ((self = [super initWithNibName:@"FBFunLoginDialog" bundle:[NSBundle mainBundle]])) {

So how can I do the same but with my navigationController?

How can I 开发者_如何学Goknow if the navigation controller is in the MainViewController?


if (self.navigationController) {
    // your view controller is inside a navigation controller
}
0

精彩评论

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