'NSInvalidArgumentException', reason: 'Unable to parse constraint format'

前端 未结 4 1318
梦如初夏
梦如初夏 2021-01-30 16:18

I have a subview that I want to keep stops during rotating screen, so I decided to put the NSLayoutConstraint type:

Trailing Space to Superview
Top Space to Supe

4条回答
  •  自闭症患者
    2021-01-30 17:00

    Easiest solution is to avoid the getters for variables from your own class and redefine variables from superclasses as local variables. A solution for your example is

    UIView *contentView = self.contentView;
    NSDictionary *viewsDictionary = NSDictionaryOfVariableBindings(_arrows, contentView);
    

提交回复
热议问题