this function is called automatically when quit application..but in my application this function cannot called automatically
+1
A:
This method is only called on your ApplicationDelegate
instance so is this where you put your code?
If you need to be notified of when your application enters background outside of the ApplicationDelegate you can register with NSNotificationCenter
.
[[NSNotificationCenter defaultCenter] addObserver: whatever
selector: @selector(enteredBackground:)
name: UIApplicationDidEnterBackgroundNotification
object: nil];
This will work in any class, but you obviously need to create the method enteredBackground
or whatever you call it :)
willcodejavaforfood
2010-10-06 11:56:47
sir how we set multitasking enabled in iphone
sidhu
2010-10-06 12:04:21
You do that in your application plist
willcodejavaforfood
2010-10-06 12:13:59
but unless you disabled multitasking it will be enabled by default. You do need iOS4 though
willcodejavaforfood
2010-10-06 12:15:27