NSGenericException', reason: 'Unable to install constraint on view

后端 未结 7 1533
花落未央
花落未央 2020-12-09 16:05

Terminating app due to uncaught exception \'NSGenericException\'

Terminating app due to uncaught exception \'NSGenericException\', reason: \'Unable to

7条回答
  •  旧巷少年郎
    2020-12-09 16:14

    I found adding this one line of code fixed this issue for a cocoa ScrollView.

    [scrollView setTranslatesAutoresizingMaskIntoConstraints:NO];
    

    I think certain views add constraints at run time therefore conflicting when you add your own via objective c, so you need to disable this behaviour...

提交回复
热议问题