"The best way to solve this (that I’ve found – please post a comment if you can provide a better one) is to remove the view from it’s superview rather than release it:"
[self.popupPreviewView removeFromSuperview];
self.popupPreviewView = nil;
The point here is that if you release the subview directly, later on when the superview tries to do something (displaying etc) in the following event loop - error will happen.
So it's a best practice to remove from parent view.
No comments:
Post a Comment