سؤال

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