Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency',

后端 未结 5 1894
借酒劲吻你
借酒劲吻你 2020-12-16 14:59

I created a toolbar above the picker with two buttons and worked on ios7, when i run in ios8 crash:

Terminating app two to uncaught exception \'UIVi

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-16 15:45

    I ran into this issue also. My code didn't have any addSubView but my xib has a UIView with another UIView inside. The UIView inside had an outlet to a UIView property as so:

    @property(nonatomic, strong) IBOutlet    UIView *inputView;
    

    What solved it was to open the xib, right click the "File's Owner" (yellow cube icon) which opens the list of views and outlets and deleting the link by unchecking the circle to the right.

提交回复
热议问题