iphone:在iOS 3.2上从iOS 4.2运行应用程序

我有个问题。我开发了一个应用程序,这个应用程序在iOS 4.2上成功运行。现在我想在iOS 3.2上运行它,但是在加载之前应用程序崩溃了。由于这行代码:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMethod) name:UIApplicationWillEnterForegroundNotification object:nil];
我知道UIApplicationWillEnterForegroundNotification不适用于iOS 3.2。但是当我使用时:
#ifdef __IPHONE_4_0
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadDataAfterEnterForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
#endif
应用程序仍在该行代码中运行并再次导致崩溃。我不知道我该怎么办才能让3.2不运行那行代码。 非常感谢你     
已邀请:
看看这篇文章。可能更喜欢像这样或类似的东西。 如何检测当前iOS是4.1还是4.2?     
用这个 // #if __IPHONE_OS_VERSION_MAX_ALLOWED> = 40000
  NSLog( @"After Version 4.0" ); 
  [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadDataAfterEnterForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
// #else // #万一     

要回复问题请先登录注册