小编iam*_*old的帖子

如何从我的superview中的所有子视图中删除约束?

我有一个包含多个UIView子视图的UIView,它们有自己的约束.如何删除子视图的约束?

//only removes the constraints on self.view
[self.view removeConstraints:self.view.constraints];

//I get warning: Incompatible pointer types sending 'NSArray *' to parameter of type 'NSLayoutConstraint'
[self.subview1 removeConstraints:self.subview1.constraints];
Run Code Online (Sandbox Code Playgroud)

objective-c uiview ios nslayoutconstraint

3
推荐指数
2
解决办法
5626
查看次数

标签 统计

ios ×1

nslayoutconstraint ×1

objective-c ×1

uiview ×1