SnapKit / Masonry

Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout
MIT License
18.06k stars 3.15k forks source link

关于带有xib的控制器,在作为子控制器的时候如何用Masonry来约束 #520

Open 964562398 opened 6 years ago

964562398 commented 6 years ago

我有一个xib的控制器AVC,然后给Bvc做子vc,在bvc中用Masonry约束AVC的view的时候里面会报这种错误 这是在bvc中把Avc的view,添加到bvc的一个view中,然后设置约束 [self.mapBottomMenuVC.view mas_remakeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(weakSelf.mapBottomMenuContentView); }]; 下面就是AVC里面一些view报的log ( "<MASLayoutConstraint:0x1c02a5280 UIView:0x104f346e0.height == 44>", "<MASLayoutConstraint:0x1c02a6a20 UIView:0x1051386f0.top == UIView:0x104f346e0.top>", "<MASLayoutConstraint:0x1c02a6a80 UIView:0x1051386f0.bottom == UIView:0x104f346e0.bottom>", "<NSLayoutConstraint:0x1c409cac0 UIView:0x105137680.top == UIView:0x104f37960.top>", "<NSLayoutConstraint:0x1c409cbb0 UIView:0x104f37960.bottom == UIView:0x105137680.bottom>", "<NSLayoutConstraint:0x1c009dab0 UILayoutGuide:0x1c01a4c20.bottom == SwipeDeleteTableView:0x10585ec00.bottom>", "<NSLayoutConstraint:0x1c009dba0 UIView:0x104f37960.top == UILayoutGuide:0x1c01a4c20.top>", "<NSLayoutConstraint:0x1c009dc40 UIView:0x1051398e0.top == UIView:0x104f37960.bottom>", "<NSLayoutConstraint:0x1c009dce0 SwipeDeleteTableView:0x10585ec00.top == UIView:0x1051398e0.bottom>", "<NSLayoutConstraint:0x1c009da10 UIView:0x1051386f0.bottom == UILayoutGuide:0x1c01a4c20.bottom>", "<NSLayoutConstraint:0x1c009d970 UILayoutGuide:0x1c01a4c20.top == UIView:0x1051386f0.top + 64>" ) 请问如何用Masonry约束带xib的控制器?