UIKIT_EXTERN NSString *const UIApplicationDidReceiveMemoryWarningNotification;
內存警告可以寫在
- (void)didReceiveMemoryWarning
{
}
方法中,但是在通知中實現效率更高,警告的方法執行順序在通知之後
[[NSNotificationCenter defaultCenter ]addObserver:self selector:@selector(memoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];