I am working with the application and want to remove table view when view disappear and want to add that same table view when view appear.
Currently
From A ctr(push) -> B ctr
From B ctr(push) -> C ctr -- I removed tableview in B ctr from superview in viewwilldisappear -- works fine.
From C ctr(pop) -> B ctr -- In view will appear of B ctr I added table view again. Viewwillaprea get called but tableview is not added as subview.
4 From B ctr(pop) -> A ctr
- From A ctr(push) -> B ctr -- This time in B ctr tableview appears.
It seems like when I come back with popViewControllerAnimated its not adding table as subview.
I have table in xib.
I want to do this in order to release the allocated memory.
tableview outlet
@property (nonatomic,weak) IBOutlet UITableView *tView;
Remove table view in viewWillDisappear
[self.tView removeFromSuperview];
Adding back in viewWillAppear
[self.view addSubview:self.tView];
Thanks in advance