I'm trying to use an ActionSheet (via a viewcontroller which is an item of the tabbarcontroller) to access another tab. But I don't seem to be able to do that.

Here is the scenario: 1. I click Tab 3 2. Actionsheet initiated 3. I click 'Cancel' 4. [here is what I want] - bring me back to tab 1.

How do i actually get 4 to work?

有帮助吗?

解决方案

I solved it by doing the following

[[self tabBarController] setSelectedIndex:0];

You set the number according to which tab you want to go to

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top