Re: Tab bar controller inside a navigation controller, how to adjust the view height
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com On Mon, 31 Jan 2011 20:29:47 +0800, ico <jche128@gmail.com> said:
I am trying to implement an app similar as "tweetie" applicatin, use UIViewController to implement a custom TabBarController that can be pushed in a navigation stack. This has been discussed before as shown here:
http://stackoverflow.com/questions/576764/tab-bar-controller-inside-a-naviga...
My app running well except for 1 problem. That is if the app receive the memory warning message, and one of the view in the tabbar, say this tabbar has 3 tabs, the first one's view(a table view) is released as it is not active when the app receive the memory warning message, then when user tap the first tab to come back with the first view, viewLoad and viewDidLoad method is called, but the view's height is not correct. I figure out the reason, that is when the tabbar get pushed into the navigation stack, the view will automatically subtract the navigationbar height from the view height, so that the tableview's height is correct. However, if the view is released and come back to it, the tableview's height is not correct anymore because it does not adjust the height by minus the navigationbar's height. Even though I know the reason, but I can't find a solution to fix it. Any help will be appreciated.
You're not supposed to put a tab bar interface inside a navigation interface. A solution that works, and that will avoid the problem you're having, is to present the tab bar interface modally. If you're not willing to do that, then you might try to implement didReceiveMemoryWarning and just return - thus preventing the view from being unloaded. m. -- matt neuburg, phd = matt@tidbits.com, <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 (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/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com
participants (1)
-
Matt Neuburg