關於內存警告

UIKIT_EXTERN NSString *const UIApplicationDidReceiveMemoryWarningNotification;

內存警告可以寫在

- (void)didReceiveMemoryWarning

{

    

}

方法中,但是在通知中實現效率更高,警告的方法執行順序在通知之後

[[NSNotificationCenter defaultCenter ]addObserver:self selector:@selector(memoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章