ParentViewController returns nil
- by Andreas Johannessen
Hi
I know there are many questions on this, but I don't get it to work.
I present a UITabBarController with the presentModalViewController. However when I try to get title from the navigationItem title attribute in the UINavigationController class that presents the tabcontroller, it returns nil no matter what I do. I have the NSLog in the viewDidLoad method in tabcontroller class.
I also cast the UIViewController which is returned by the self.parentViewController property.
Then I try to access the title through: NSLog(@"%@", castedViewController.navigationItem.title);
Any suggestions?