阅读背景:

我可以在相同的视图上使用setFrame和autolayout吗?

来源:互联网 

I want to add padding to all of my buttons, so I subclassed UIButton, and among other changes, I wanted to add a fixed padding by using setFrame method. Everything was working, except for setFrame. I checked around, and I found out that if I uncheck "using AutoLayout" on that view, then I can use setFrame, and it works. Is there a way around this? I really want to use autolayout, because it helps in making the app look nice on both iphone 5 and earlier devices. But I also would like to use setFrame in my subclass, to make my life a litle easier.I want to add padding to all of my buttons, so




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: