I am having problems using TransitionfromView while transitioning between views in my app.
Setup
This is the basic setup of the View Controller. It has two views in it. A MKMapView and a UITableView. When the toggle button is pressed, it is supposed to alternate views between map and 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 tableview 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 I transition from TableView from MapView the value of the tableview is null(0x0000000). I do understand the behaviour of the transitionfromview is to remove the view from the parent view. But when I try add the tableview as a subview after the transition it doesn't work, since the value is null. So my question is how do I add the tableview after the transition if the view is nulled?
PS: I apologize if this is a simple question, but I am new to iOS programming and did try to look in the forums before posting this question.