使用Masonry時(shí)出現(xiàn)
[LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.?
Try this:?
(1) look at each constraint and try to figure out which you don't expect;?
(2) find the code that added the unwanted constraint or constraints and fix it.?
至于解決方案勘高,就是對(duì)view內(nèi)部使用Masonry布局的空間添加布局優(yōu)先級(jí)迁沫,就可以移除這些警告了项郊。
例如:
[self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker*make){make.edges.equalTo(self);}];
修改為:
[self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker*make){make.edges.equalTo(self).priorityHigh();}];