I have a view that exits in its own class, with its own xib.
This view is initialized and added as a subview to my viewController view.
When the view is initialized, the method layoutSubviews is called where i customize some stuff in the view.
BUT which method is called when the view is removed from the superview (if any)?
For example, for a ViewController, viewWill/DidDisappear is called. Is there a similar method to a UIView (opposite to the layoutSubviews)?
Thanks in advance
---EDIT---
I just found a method that is called both on adding and removing a subView:
- (void)willMoveToSuperview:(UIView *)newSuperview
AND if newSuperview == 0, you can customize the removing of the subview.
Am i right or is it a tacky way to handle the situation?