Determine whether UIView is visible to the user?
For anyone else that ends up here: To determine if a UIView is onscreen somewhere, rather than checking superview != nil, it is better to check if window != nil. In the former case, it is possible that the view has a superview but that the superview is not on screen: if (view.window != nil) … Read more