Folks, need some help here. Just can't figure this out. Does anyone have an example of some code that animates the transition between two tabs of a UITabBarController?
I am looking to use a swipe gesture to allow people to change tabs. I have the swipe working, but it just changes to the next tab with no animation. In each ViewController assigned to the UITabBarController I have the following code for Left and Right swipe gestures.
protected void HandleLeftSwipe(UISwipeGestureRecognizer recognizer)
{
if (this.TabBarController.SelectedIndex != 4) {
this.TabBarController.SelectedIndex = this.TabBarController.SelectedIndex + 1;
}
}
protected void HandleRightSwipe(UISwipeGestureRecognizer recognizer)
{
if (this.TabBarController.SelectedIndex != 0) {
this.TabBarController.SelectedIndex = this.TabBarController.SelectedIndex - 1;
}
}
This is one part of iOS programming that still eludes me. Hoping someone can shed some light on this. Thanks! Bob