Re: Question about split view
Re: Question about split view
- Subject: Re: Question about split view
- From: Matt Neuburg <email@hidden>
- Date: Sun, 16 Jan 2011 18:44:44 -0800
On Sun, 16 Jan 2011 18:35:45 -0500, Phillip Mills <email@hidden> said:
>I see a problem with the following scenario:
>1) Start with the template project for a split view
>2) Add a function where a modal view can be shown over it using a style of UIModalPresentationFullScreen
>3) Run in portrait mode
>4) While the modal view is being shown, trigger a memory warning
>5) Dismiss the modal view
>
>The result is that the 'Events' button that brings up the popover root controller is no longer displayed. The view has been reloaded, but the callback that sets up the 'Events' button hasn't been activated.
>
>I'm handling this by saving a reference to the button the first time I'm given it and then, in viewDidAppear:, checking for portrait orientation and the identity of the first item on the toolbar. This feels like a hack. Does anyone have a better strategy for this one?
>
I've had similar problems with a UINavigationController on iPhone where if there's a memory warning while the root view is hidden and the app is in the background the nav bar stack is messed up when we resume the app. My solution is to implement didReceiveMemoryWarning and just return, thus preventing the root view from being unloaded. You can call *that* a hack if you like, but my attitude is, hey iOS, if you're not going manage memory correctly I'm not going to let you mess with memory at all. Anyway, what I'm suggesting is that you try that sort of thing, to see if you can prevent the split view and its subcontrollers from having their views unloaded. m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________
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