n-b / UIView-NibLoading

UIView category and subclass for loading content subviews from nib files.
http://bou.io/UIView-NibLoading.html
MIT License
67 stars 14 forks source link

Fixed iOS6 crash due to view being associated with multiple parent views #7

Open gslomin opened 10 years ago

gslomin commented 10 years ago

This should fix the crash in iOS 6 that happens when a NibLoadedView is deallocated. This happens because iOS6 still returns the old container view as it's superview after it has been added to it's new parent.

This usually either crashes in [NSISEngine removeConstraintWithMarker:] on a device or "getpid" on the simulator.

jessenaugher commented 10 years ago

Looks good to me, and fixed my problem as well. Thanks for the PR