From f99ab2b23fcbb97f3dd5b0d35a4ed859a76685c0 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Thu, 19 May 2016 14:38:14 +0300 Subject: [PATCH] Example added text fixed --- apps/tests/application-tests.ios.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/tests/application-tests.ios.ts b/apps/tests/application-tests.ios.ts index e0c833e49..30fab1538 100644 --- a/apps/tests/application-tests.ios.ts +++ b/apps/tests/application-tests.ios.ts @@ -19,4 +19,25 @@ if (app.ios) { if (app.ios) { app.ios.removeNotificationObserver(observer, UIDeviceBatteryLevelDidChangeNotification); } -// << application-ios-observer \ No newline at end of file +// << application-ios-observer + +// >> application-ios-delegate +//// Add custom application delegate +if (app.ios) { + class MyDelegate extends UIResponder implements UIApplicationDelegate { + public static ObjCProtocols = [UIApplicationDelegate]; + + applicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary): boolean { + return true; + } + + applicationDidBecomeActive(application: UIApplication): void { + // Get reference to the application window. + //console.log("keyWindow: " + application.keyWindow); + } + } + + app.ios.delegate = MyDelegate; +} + +// << application-ios-delegate \ No newline at end of file