gsdios / SDAutoLayout

One line of code to implement automatic layout. 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于做最简单易用的AutoLayout库。The most easy way for autoLayout. Based on runtime.
MIT License
5.9k stars 1.28k forks source link

sdautolayout布局失效,控件都挤到了(0,0)的位置 #295

Closed dboce closed 5 years ago

dboce commented 5 years ago

所有布局全部失效,今升级了Xcode10后,运行项目所有的布局全部失效.写了一个Demo也是出现这种情况.不知到怎么解决? UILabel * label = [UILabel new]; label.backgroundColor = [UIColor redColor]; [self.view sd_addSubviews:@[label]];

label.sd_layout
.topSpaceToView(self.view, 100)
.rightSpaceToView(self.view, 10)
.heightIs(150)
.widthIs(200);
dboce commented 5 years ago

现在用xcode9.4.1运行也一样,布局不起作用.控件坐标是(0,0)

dboce commented 5 years ago

原因大体上找到了,跟JKCategories冲突了