I have a viewController that has a tableView and a mapView, and only one is visible. I also have a toolbar with segment control with two buttons (list and map)
How do I switch between the table view and the map view ? and it's important that the toolbar will stay locked without animating with the views.
After more thinking I found a solution, add another view as a container view for both table view and map view.
This way i can do:   
   [UIView transitionWithView:self.someContainerView
                     duration:1.0
                     options:UIViewAnimationOptionTransitionFlipFromLeft 
                     animations:^{
                         self.mapView.hidden   = !showingMapView;
                         self.tableView.hidden = showingMapView;
                     } completion:nil
    ];  
without flipping the toolbar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With