我們當地的低內存警告使用此代碼反應警告:低內存有足夠的空RAM
- (void)manageMemoryWarning {
[[[SPAlertView alloc] initWithTitle:kHinweis message:[WWSError errorTextForCode:WWSErrorSpeicherfastvoll] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Hilfe", nil] show];
}
- (void)start {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(manageMemoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
}
- (void)stop {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
}
雖然有320MB空的RAM空間應用越來越這樣的警告,並呈現警報用戶。爲什麼警告被解僱?有足夠的空間。
@HAS警報由didReceiveMemoryWarning方法觸發。 – 2015-02-18 14:08:43