mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
updated user preferences and application
This commit is contained in:
@ -54,10 +54,10 @@ class iOSApplication {
|
||||
this.window.backgroundColor = UIKit.UIColor.whiteColor();
|
||||
this.window.makeKeyAndVisible();
|
||||
|
||||
if (appModule.onLaunch) {
|
||||
this.window.rootViewController = appModule.onLaunch();
|
||||
if (exports.onLaunch) {
|
||||
this.window.rootViewController = exports.onLaunch();
|
||||
} else {
|
||||
log("Missing TK.UI.Application.current.onLaunch");
|
||||
log("Missing Application.onLaunch");
|
||||
}
|
||||
|
||||
log("applicationDidFinishLaunchingWithOptions finished.");
|
||||
@ -66,8 +66,8 @@ class iOSApplication {
|
||||
|
||||
applicationDidBecomeActive: function (application) {
|
||||
log("applicationDidBecomeActive: " + application);
|
||||
if (appModule.onResume) {
|
||||
appModule.onResume();
|
||||
if (exports.onResume) {
|
||||
exports.onResume();
|
||||
}
|
||||
},
|
||||
|
||||
@ -77,8 +77,8 @@ class iOSApplication {
|
||||
|
||||
applicationDidEnterBackground: function (application) {
|
||||
log("applicationDidEnterBackground: " + application);
|
||||
if (appModule.onSuspend) {
|
||||
appModule.onSuspend();
|
||||
if (exports.onSuspend) {
|
||||
exports.onSuspend();
|
||||
}
|
||||
},
|
||||
|
||||
@ -88,15 +88,15 @@ class iOSApplication {
|
||||
|
||||
applicationWillTerminate: function (application) {
|
||||
log("applicationWillTerminate: " + application);
|
||||
if (appModule.onExit) {
|
||||
appModule.onExit();
|
||||
if (exports.onExit) {
|
||||
exports.onExit();
|
||||
}
|
||||
},
|
||||
|
||||
applicationDidReceiveMemoryWarning: function (application) {
|
||||
log("applicationDidReceiveMemoryWarning: " + application);
|
||||
if (appModule.onLowMemory) {
|
||||
appModule.onLowMemory();
|
||||
if (exports.onLowMemory) {
|
||||
exports.onLowMemory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,14 @@
|
||||
require("globals");
|
||||
|
||||
export var onLaunch = function (): any {
|
||||
}
|
||||
export var onLaunch: () => any = undefined;
|
||||
|
||||
export var onSuspend = function (): void {
|
||||
}
|
||||
export var onSuspend: () => any = undefined;
|
||||
|
||||
export var onResume = function (): void {
|
||||
}
|
||||
export var onResume: () => any = undefined;
|
||||
|
||||
export var onExit = function (): void {
|
||||
}
|
||||
export var onExit: () => any = undefined;
|
||||
|
||||
export var onLowMemory = function (): void {
|
||||
}
|
||||
export var onLowMemory: () => any = undefined;
|
||||
|
||||
export var android = undefined;
|
||||
|
||||
|
Reference in New Issue
Block a user