Is there a way to open my application on a specific tab upon receiving a push notification?

醉酒当歌 提交于 2020-01-05 08:40:56

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!