The two answers are great! And they helped. But there are some observations that I find interesting to do. The @DouglasFerreira solution, make a new instance of objects already created by the Storyboard. And since I have some screens before loading the TabBarController, then it would not act on the correct object.
The solution presented by @iTSangar did not work because the object did not respond to direct pointing in the variable selectedIndex
.
The solution I created was as follows:
I created a controller class and called it with the TabBarController in the Storyboar, and in the method
viewDidLoad
, as recommended by @iTSangar, I did this:
[self setSelectedIndex:2];
And it worked !!