• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UISplitViewController some of the time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UISplitViewController some of the time


  • Subject: Re: UISplitViewController some of the time
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Thu, 03 Nov 2011 13:28:22 -0400

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 <email@hidden> wrote:

> On Thu, 03 Nov 2011 11:00:27 -0400, "Eric E. Dolecki" <email@hidden>
> 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 = email@hidden, <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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UISplitViewController some of the time
      • From: Conrad Shultz <email@hidden>
References: 
 >Re: UISplitViewController some of the time (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Read Keyboard
  • Next by Date: Re: Read Keyboard
  • Previous by thread: Re: UISplitViewController some of the time
  • Next by thread: Re: UISplitViewController some of the time
  • Index(es):
    • Date
    • Thread