I am having problems using TransitionfromView when switching between views in my application.
Customization
This is the basic setting of the view controller. It has two types. MKMapView and UITableView. When the switch button is pressed, it should alternate views between the map and the table.
This is my * .h file
@interface BrowseBeaconsViewController : UIViewController <UITableViewDelegate, MKMapViewDelegate, UITableViewDataSource, CLLocationManagerDelegate > { __weak IBOutlet UIBarButtonItem *refreshBeacons; __weak IBOutlet UIBarButtonItem *toggleView; MKMapView* beaconMapView; __weak IBOutlet UITableView* beaconTableView; }
So, the table view comes from the storyboard, while mapview is created in the program.
Problem
[UIView transitionFromView:beaconTableView toView:beaconMapView duration:1.0 options:UIViewAnimationOptionTransitionFlipFromLeft completion:^(BOOL finished) {}];
When moving from a TableView to a MapView, the value of tableview is null (0x0000000). I understand that transition behavior is to remove a view from its parent view. But when I try to add a tableview as a preview after the transition, it does not work as the value is null. So my question is how to add a table view after the transition, if the view is nullified?
PS: I apologize if this is a simple question, but I'm new to iOS programming and tried to look at the forums before posting this question.
ios uitableview uiviewanimationtransition
omgpython
source share