In my app I have 4 tabs, on the first Tab : I have 4 views. on second view,there is one button which will open the third tab view. But my selected tab Index is One. How can I ch
In Swift 2, you can just call:
self.tabBarController?.selectedIndex = 0
self.tabBarController.selectedViewController=[self.tabBarController.viewControllers objectAtIndex:3];
Try this. This will helpful for you.
On Button Click
[self.navigationController pushViewController:YourView animated:YES];
[self.tabBarController setSelectedIndex:index];
The simplest way to programatically switch tabs within the app is by doing this ..
[self.tabBarController setSelectedIndex:3];
I use this in one of my apps and it works extremely well.
Plasma