我需要从应用程序委托中选择选项卡上的索引,并在视图控制器中调用该选项卡在情节提要中映射到的函数
(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
NSString *alertMessage = [[userInfo objectForKey:@"aps"] valueForKey:@"alert"];
if (alertMessage != nil){
UITabBarController *tabb = (UITabBarController *)self.window.rootViewController;
tabb.selectedIndex = 2;
// Need to call a method in my SpecialsViewController which manages properties and functions of tab with index 2
}
}