I have a problem. I develop a application, this app run successfully on iOS 4.2. Now I would like to run it on iOS 3.2, but the application crash before it load. Because of this line of code:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMethod) name:UIApplicationWillEnterForegroundNotification object:nil];
I understand that UIApplicationWillEnterForegroundNotification is not available for iOS 3.2. But when I use:
#ifdef __IPHONE_4_0
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadDataAfterEnterForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
#endif
The application still run in that line of code and cause crash again. I don't know what should I do to let 3.2 does not run that line of code.
Thank you very much