"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
I don't think it's possible to use SplitViewController and display the button for the master view in a navigationItem. The UISplitViewControllerDelegate is specifically designed to work with a UIBarButtonItem, you'll probably have to implement a custom popover controller to get that to work.
Up vote 0 down vote favorite share g+ share fb share tw.
I'm presenting a modal view controller in a UISplitViewController based app. I've swapped the default detail view for a UINavigationController. In my UINavigationController, I've implemented some methods to show the "Master" button for the split view controller in the top left.
The problem is that when the device orientation changes while the modal view is visible, the button does not disappear from the main view in my navigation controller. What could be causing this issue? EDIT: I've moved the template logic for the button into a subclass of UINavigationController.
The problem is that when the visibleViewController presents a modalViewcontroller, it becomes the visibleViewController. So, my code won't correctly remove the button for some reason. Here's my code: Code: #pragma mark - Split view support - (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController: (UIPopoverController *)pc{ barButtonItem.
Title = NSLocalizedString(@"Menu", @""); // // TODO: Handle cases where there is // a modal view controller that is // being shown to the user. // ((UIViewController *)self. ViewControllers objectAtIndex:0).
NavigationItem setLeftBarButtonItem:barButtonItem; self. PopoverController = pc; } // Called when the view is shown again in the split view, invalidating the button and popover controller. - (void)splitViewController:(UISplitViewController *)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem{ self.
VisibleViewController. NavigationItem setLeftBarButtonItem:nil; self. PopoverController dismissPopoverAnimated:YES; self.
PopoverController = nil; } // // Preserve navigation items across detail // view loads in portrait mode. // - (void)setViewControllers:(NSArray *)viewControllers animated:(BOOL)animated{ UIBarButtonItem *barItem = nil; if (self. VisibleViewController.navigationItem.
LeftBarButtonItem! = nil) { barItem = self. VisibleViewController.navigationItem.
LeftBarButtonItem; } super setViewControllers:viewControllers animated:animated; if (barItem! = nil) { self. VisibleViewController.
NavigationItem setLeftBarButtonItem:barItem; } } iphone ios ipad uinavigationcontroller uisplitviewcontroller link|improve this question edited Jun 27 '11 at 14:31 asked Jun 26 '11 at 2:15Moshe13k836112 97% accept rate.
– RyanR Jun 26 '11 at 15:17 Yes, my problem is accessing the correct view controller. Apparently, I'm doing it wrong, since the modal view controller becomes the "visibleViewController" for some reason. – Moshe Jun 26 '11 at 15:59 So the methods are being called at the same time and in the same order as a 'normal' split view project?
– RyanR Jun 26 '11 at 16:04 @RyanR - Yep, the code is all there. – Moshe Jun 26 '11 at 19:47.
I did, but the problem is that I'm not using a toolbar, but rather a UINavigationController and so the toolbar isn't there. I've modified the code to use the UINavigationItem of the visible view controller. – Moshe Jun 26 '11 at 3:36 My mistake, I misunderstood your question.
Updating my answer – RyanR Jun 26 '11 at 3:47 The same popover controller works, I'll try to edit my question for clarity. – Moshe Jun 26 '11 at 4:13 Edited and added code. – Moshe Jun 26 '11 at 4:17.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.