Sorry - but I am not following you. What I just tried that almost work is:

In my detail view controller for the split view controller, I added in it's
viewDidLoad:

HomeUIViewController *tmp = [[HomeUIViewController alloc] init];
[self presentModalViewController:tmp animated:NO];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(removeMainView:)
name:@"removeMainView" object:nil];

And added this method to the same detail view controller:

- (void)removeMainView:(NSNotification *)notification {
    [self dismissModalViewControllerAnimated:YES];
}
In my HomeUIViewController I have a button that broadcasts that
"removeMainView" - which causes the viewcontroller to be removed.

This seems to work, however the main view controller in the split view (the
left side) is black until I rotate the iPad around. Detail view controller
displays fine. Also when the HomeUIViewController is presented, it's in
portrait even when the iPad is rotated to a landscape.

Is there a way to get views to update programmatically (as if it were
rotated around)? That bit would make this work (I think)




  Google Voice: (508) 656-0622
  Twitter: eric_dolecki      XBoxLive: edolecki      PSN: eric_dolecki
  http://blog.ericd.net



On Thu, Nov 3, 2011 at 12:57 PM, Matt Neuburg <m...@tidbits.com> wrote:

> On Thu, 03 Nov 2011 11:00:27 -0400, "Eric E. Dolecki" <edole...@gmail.com>
> said:
> >I am developing an application for the iPad which uses a
> >UISplitViewController (via template). Now I'd like to add a "Home"
> >UIViewController to the storyboard and have that be the initial view
> >controller. However Apple states if using the SplitViewController it
> should
> >always be the root. Okay... so how can I add a UIViewController ON TOP of
> >the navigation controller the splitview is using to quasi-make a home
> >screen?
>
> You could just lay a modal view on top of the whole thing. This is what
> modal views are for. They are really misnamed. They are not about modality;
> they are just another way of completely replacing a view hierarchy. This is
> one reason why you're not supposed to call presentModal... any more.
>
> Furthermore, in iOS 5 you can design your own container view controller.
> So go nuts. Roll your own variant on a split view controller, and now none
> of Apple's rules apply to you. m.
>
> --
> matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/>
> A fool + a tool + an autorelease pool = cool!
> Programming iOS 4!
> http://www.apeth.net/matt/default.html#iosbook
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to