ios - Launch app on specific view controller using iOS8 actionable notifications -
I have a functional information setup on my app with the YES button. Is it possible when the notification is triggered? And to move you to an application on a specific view controller, click on the button, not the initial view.
Yes you use this new method of iOS8 using the Representative for local notifications : Local notification when your app is activated by the user Representative for Remote Notification : When your app provides remote notices by the user Application: (UIApplication *) Application Handle ActionWidth Identifier: (NSString *) for identifier. Remote notification: (NSDictionary *) userInfo completionHandler: (Zero (^) ()) Finishing Handler < / Code> Note: As soon as you complete the operation, you should call the full operator. Then you can use your Other related handleActionWithIdentifier You can. Whenever you press the action button, this delegate will call.
- ( Zero) Application: (UIApplication *) Application Handle ActionWidth Identifier: Local Notification (NSString *) Identifier: (UILocalNotification *) Notification Complete Handler: (Zero (^) ()) Full Handler
rootViewController and then redirect to another view controller.
- (UIViewController *) GetTopViewController {AppDelegate * appDelegate = (AppDelegate *) [[UIApplication shared application] representative]; UIViewController * RootviewConverter = appDelegate.window.rootViewController; If ([RootviewControllerHyndoffClass: [UIOVisionController Class]]) {UINavigationController * rvc = (UINavigationController *) RootviewController; RootViewController = rvc.visibleViewController; } Return Root View Controller; }
Comments
Post a Comment