ui/app: (iOS) move memory pressure callback to view controller

With multiple GioViewControllers we might invoke the garbage collector
more than once, but in return we simplify the GioAppDelegate which will
become the interface to native widgets.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-20 16:50:35 +02:00
parent e6a68db4c0
commit ac6f0c3f18
+5 -10
View File
@@ -63,16 +63,6 @@ static void redraw(CFTypeRef viewRef, BOOL sync) {
redraw(viewRef, YES);
}
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
}
- (void)applicationWillTerminate:(UIApplication *)application {
}
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
onLowMemory();
}
@end
@implementation GioViewController
@@ -120,6 +110,11 @@ CGFloat _keyboardHeight;
redraw((__bridge CFTypeRef)view, YES);
}
- (void)didReceiveMemoryWarning {
onLowMemory();
[super didReceiveMemoryWarning];
}
- (void)keyboardWillChange:(NSNotification *)note {
NSDictionary *userInfo = note.userInfo;
CGRect f = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];