Sunday, 15 August 2010

swift - What method is triggered when local notification is dismissed from notification centre of iOS? -


I'm trying to create an app that sets a local notification on fire and when the notification taps A specific view controller should be opened. I used the didReiveiveLocalNotification method to display a specific view controller, but when I dismiss the notification from the Notification Center, this specific view controller is still displayed.

What method does it start when we reject the notification?

Here is the code I used:

  func application (application: UIApplication !, DidReiveiveLocalNotification Notification: UILocalNotification) {var root = self.window! ViewController mainly: TapViewController / root navigation controller as UIStoryboard = UIStoryboard (name: "main", bundle: zero) var setview = main.instantiateViewControllerWithIdentifier ("Destination")? .popToViewController (Set View, Animated: False) if application.applicationState == UIApplicationState.Inactive {root.presentViewController (Setview, Animated: false, perfection: zero)}}  

As far as I can see the answer to your question on Web and Apple Docs, there is no 'Rep' method available which rejects a notification goes.

And cancel the logic (information) is a custom method to be called one by one.


No comments:

Post a Comment