Is there a way to open my application on a specifi

2019-08-13 22:54发布

问题:

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.