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

能否出一个swift版本,谢谢 #9

Closed zj2050 closed 8 years ago

zj2050 commented 8 years ago

能否出一个swift版本,谢谢

gsdios commented 8 years ago

后期会出的。

gsdios commented 8 years ago

现在 也可以在 swift使用的

sunboy123 commented 8 years ago

没有在swift中使用的教程说明呀

jenhausu commented 7 years ago

@lumiao0113 其實用法差不多

_ = startButton.sd_layout().bottomSpaceToView(self.view, 200)?.centerXEqualToView(self.view)

前面的「 = 」只是因為你不加的話 swift 會警告你,說你 return 的 SDAutoLayoutModel 沒有用變數存起來,但我們不需要,所以加個「 = 」就可以了。