UIKIT_EXTERN NSString *const UIApplicationDidReceiveMemoryWarningNotification;
内存警告可以写在
- (void)didReceiveMemoryWarning
{
}
方法中,但是在通知中实现效率更高,警告的方法执行顺序在通知之后
[[NSNotificationCenter defaultCenter ]addObserver:self selector:@selector(memoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];