Add a compile time condition in order to compile with Base SDK pre iOS4

This commit is contained in:
Olivier Poitrey 2010-06-11 15:14:42 +02:00
parent d128c27cad
commit 1b0cf3a3fb
1 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,7 @@ static SDImageCache *instance;
name:UIApplicationWillTerminateNotification name:UIApplicationWillTerminateNotification
object:nil]; object:nil];
#ifdef __IPHONE_4_0
UIDevice *device = [UIDevice currentDevice]; UIDevice *device = [UIDevice currentDevice];
if ([device respondsToSelector:@selector(isMultitaskingSupported)] && device.multitaskingSupported) if ([device respondsToSelector:@selector(isMultitaskingSupported)] && device.multitaskingSupported)
{ {
@ -60,6 +61,7 @@ static SDImageCache *instance;
name:UIApplicationDidEnterBackgroundNotification name:UIApplicationDidEnterBackgroundNotification
object:nil]; object:nil];
} }
#endif
} }
return self; return self;