From 114118bc7ad81be1bcc28c97ac0c08723f884c84 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Tue, 4 Aug 2015 16:14:40 +0300 Subject: [PATCH] wrong "this" fixed --- application/application.ios.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/application.ios.ts b/application/application.ios.ts index aae7b25a7..638692bf7 100644 --- a/application/application.ios.ts +++ b/application/application.ios.ts @@ -67,12 +67,12 @@ class IOSApplication implements definition.iOSApplication { private _window: Window; constructor() { - this.addNotificationObserver(UIApplicationDidFinishLaunchingNotification, this.didFinishLaunchingWithOptions); - this.addNotificationObserver(UIApplicationDidBecomeActiveNotification, this.didBecomeActive); - this.addNotificationObserver(UIApplicationDidEnterBackgroundNotification, this.didEnterBackground); - this.addNotificationObserver(UIApplicationWillTerminateNotification, this.willTerminate); - this.addNotificationObserver(UIApplicationDidReceiveMemoryWarningNotification, this.didReceiveMemoryWarning); - this.addNotificationObserver(UIDeviceOrientationDidChangeNotification, this.orientationDidChange); + this.addNotificationObserver(UIApplicationDidFinishLaunchingNotification, this.didFinishLaunchingWithOptions.bind(this)); + this.addNotificationObserver(UIApplicationDidBecomeActiveNotification, this.didBecomeActive.bind(this)); + this.addNotificationObserver(UIApplicationDidEnterBackgroundNotification, this.didEnterBackground.bind(this)); + this.addNotificationObserver(UIApplicationWillTerminateNotification, this.willTerminate.bind(this)); + this.addNotificationObserver(UIApplicationDidReceiveMemoryWarningNotification, this.didReceiveMemoryWarning.bind(this)); + this.addNotificationObserver(UIDeviceOrientationDidChangeNotification, this.orientationDidChange.bind(this)); } get nativeApp(): UIApplication {