问题
Is there a way to open my application on a specific tab upon receiving a push notification?
回答1:
Do a search for Push Notification tutorial on Google, you'll find a few really good links. Study the examples and review the code.
Then create a method something like this:
-(void)goToNewsTab { [controller setSelectedIndex:4]; }
Where controller is your UITabBar.
回答2:
Yes, there is.
Try setting the selectedIndex property of your UITabBarController.
来源:https://stackoverflow.com/questions/3968372/is-there-a-way-to-open-my-application-on-a-specific-tab-upon-receiving-a-push-no