Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-13-2012, 06:54 AM   #1 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default performing UI updates in applicationWillResignActive

I have a tabbar application with a bit of a bug.

When the application goes inactive we need to move to the first tab. so we have this in the app delegate:
Code:
- (void)applicationWillResignActive:(UIApplication *)application {
	[self.tabBarController setSelectedIndex:0];
}
On one of the tabs we allow the device to change orientation to landscape. If the application is in landscape and the user presses either the home button or the power button this method is called and it seems to also call the
Code:
- (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
In the tab that is in landscape. The view gets corrected and everything is fine.

If however the user just puts down the application while in landscape mode the UI isn't corrected.
The applicationWillResignActive method IS called and it is selecting the first tab. I have added logging to the willAnimateRotationToInterfaceOrientation method as well and this is a bit strange. When I press the home button or exit button although the code in the willAnimateRotationToInterfaceOrientation seems to run there is no logging.

I am logging 'self' in viewdidappear and it IS the same object I am loading so I'm not loading a fewsh new screen or anything.

Back to my question I suppose - I guess I shouldn't be trying to update the UI in the applicationWillResignActive method - is there anything called before that perhaps I could call to sort out the UI before the app goes to sleep?
sneaky is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 378
10 members and 368 guests
7twenty7, Atatator, glenn_sayers, guusleijsten, iphonedevshani, QuantumDoja, sacha1996, Sami Gh, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,674
Threads: 94,122
Posts: 402,907
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Atatator
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:42 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0