updated user preferences and application

This commit is contained in:
Stanimir Karoserov
2014-05-12 16:52:08 +03:00
parent d1652ad831
commit da9966a9c9
7 changed files with 283 additions and 185 deletions

View File

@ -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();
}
}
}

View File

@ -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;