Pergunta

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?

Foi útil?

Solução

I solved it by doing the following

[[self tabBarController] setSelectedIndex:0];

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top