It seems that the UIView has not methods like "didRemoveFromSuperview" or "willRemoveFromSuperview".Then,How to listen to the event when a UIView removed from its superView?I should use KVO? thanks in advance!
A:
You can subclass your UIView and post notifications from it's - (void)removeFromSuperview
method.
beefon
2010-06-19 08:42:48
I find.Api doc says:willMoveToSuperview:Informs the receiver that its superview is about to change to the specified superview (which may be nil).-----------------------------------------When this method is called and the parameter is nil, the view is being removed
Jagie
2010-06-19 10:15:33