Question

I'd like to be able to detect when the multitasking bar is in use (double-clicking the home button). Is this possible?

NOTE: I'm not asking about detecting when the app is switched to the background, but just when the bar pops up, for instance to control the orientation lock or iPod controls.

Was it helpful?

Solution

From the Apple documentation for applicationWillResignActive:

This method is called to let your application know that it is about to move from the active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. An application in the inactive state continues to run but does not dispatch incoming events to responders.

This method is called when the user double-clicks the home button. That would probably be a good place to pause the game.

OTHER TIPS

You could possibly try setting a KVC observer around the Window for the app.. I don't think the size changes, it looks like the Y origin might shift up.

Not sure what you are planning to do in that case though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top