Is willMoveToSuperview (with zero) called when a view is removed from the hierarchy?

If you implement willMoveToSuperviewin a subclass UIView, is its call guaranteed (c nil) when removeFromSuperviewcalled in your view?

The docs say that the parameter newSuperviewmay be niland that it calls “whenever the supervisor changes”, but I'm not sure if I can interpret it so that it will be called when the view is removed from its supervisor, even if it does not move to another supervisor.

+5
source share
1 answer

, removeFromSuperview, viewview nil, [self willMoveToSuperview:nil].

+13

All Articles