Reputation: 77616
I have a subclass of UIView, I want to be notified as soon as the view is loaded on the screen. Is there some kind of delegate method for a UIView.
NOTE: I am not using a UIViewController
Upvotes: 0
Views: 517
Reputation: 11970
If you are not using OpenGL, you could use the - (void)drawRect:(CGRect)rect for that.
Upvotes: 0
Reputation: 5156
There is no delegate method but you can override,
- (void)didAddSubview:(UIView *)subview{
}
Upvotes: 4
Reputation: 32
Set the class which opens your view as the delegate of the view, then on viewDidLoad (which runs as soon as the view is opened, even if it's not by a viewController per se) notify the delegate. That should work, I believe.
Upvotes: -2