mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(ios): addDelegateHandler to add App Delegate handlers (#10371)
This commit is contained in:
@@ -12,6 +12,13 @@ if (Application.ios) {
|
||||
Application.ios.addNotificationObserver(UIApplicationDidFinishLaunchingNotification, (notification: NSNotification) => {
|
||||
console.log('UIApplicationDidFinishLaunchingNotification:', notification);
|
||||
});
|
||||
|
||||
// Make sure we can add multiple handlers for the same event.
|
||||
for (let i = 0; i < 10; i++) {
|
||||
Application.ios.addDelegateHandler('applicationDidBecomeActive', (application: UIApplication) => {
|
||||
console.log('applicationDidBecomeActive', i, application);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Common events for both Android and iOS.
|
||||
|
||||
Reference in New Issue
Block a user