Closed justwudi closed 9 years ago
Added a check as window can be nil in didMoveToWindow, which causes an error when removeFromSuperview is called. (Source: Apple)
window
nil
didMoveToWindow
removeFromSuperview
Of course, good catch. Can you please use optional unwrapping (if let window = window ...) instead of the ! operator and I will merge it. Thanks
Added a check as
window
can benil
indidMoveToWindow
, which causes an error whenremoveFromSuperview
is called. (Source: Apple)