点击推送通知的横幅时跳转到指定界面
2016-03-02 本文已影响121人
苏格拉木有底oo
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
badge = badge + 1
application.applicationIconBadgeNumber = badge
let vc = application.keyWindow?.rootViewController as? UITabBarController
if application.applicationState == UIApplicationState.Inactive {
vc?.selectedIndex = 3
}
}