Once your view controller's viewDidLoad
method is called, self.view
- your view controller's main view - has loaded. If you added subviews to it, for example in a storyboard or in loadView
, those have been loaded as well.
There is no method that's automatically called when you hide or unhide these views. It's expected that you'd know when this happens since you're the one doing it.
If you want, you could make view controller properties for each view, and then override the setter. Then your setter will get notified when it happens.
Create the property:
@property (nonatomic, assign) BOOL someviewIsHidden;
Override the setter:
- (void) setSomeviewIsHidden:(BOOL)someViewIsHidden {
_someViewIsHidden = someViewIsHidden; // Set the iVar backing the property
self.theview.hidden = someViewIsHidden; // Hide (or unhide) the view
// Do whatever else you want when this property is changed
}