简体   繁体   English

如何在Swift中单击UILocalNotification时如何启动特定的ViewController

[英]How Do You Launch A Specific ViewController When UILocalNotification Is Clicked In Swift

I am firing UILocalNotifications in Swift and that is working fine. 我正在Swift中解雇UILocalNotifications,这很正常。 However, when I click the notification it opens my app like it normally would (to the default ViewController). 但是,当我点击通知时,它会像通常那样(默认的ViewController)打开我的应用程序。 How do I make it open a specific ViewController instead? 如何让它打开特定的ViewController呢?

For handling the notification, the application in AppDelegate should be overwritten. 为了处理通知,应该覆盖AppDelegate中的应用程序。

func application(application: UIApplication, didReceiveLocalNotification notification: UILocalNotification) func应用程序(应用程序:UIApplication,didReceiveLocalNotification通知:UILocalNotification)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何快速编写if / else语句,以便在iOS tableview中单击特定单元格时将其转到特定的viewController - How to write if/else statement in swift so that when a specific cell is clicked in iOS tableview it goes to a specific viewController 如何从Flutter平台使用Swift编写的代码中启动ViewController? - How to launch a ViewController from Flutter Platform Specific code written in Swift? iOS UILocalNotification启动特定屏幕 - iOS UILocalNotification launch specific screen 如何在Swift 2中的特定方向上正确锁定ViewController? - How do I properly lock my viewController in a specific orientation in swift 2? 如何在iOS中触发uilocalnotification时(而不是单击时)捕获? - how to catch when uilocalnotification is fired (not when it is clicked) in iOS? Swift-如何使用从ViewController到特定TabBarController的按钮进行搜索 - Swift - How do I segue with a button from ViewController to a specific TabBarController 如何在同一ViewController中为特定的UITextField禁用键盘? - How do you disable keyboard for specific UITextField in same ViewController? 如何在Swift中使用UILocalNotification - How To Use UILocalNotification In Swift 如何使UILocalNotification不迅速重复? - How to make UILocalNotification not repeat in swift? swift-如何检查特定的viewController是否为先前的viewController - swift - how can i check if a specific viewController is the previous viewController
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM