开发者

UI elements - make position fluid?

I realise you can make dimentions fluid by using the autoresizing mask to give a flexible width/height.

What about making a position fluid?

For instance if I set 开发者_如何学Pythonthe centre of a UIButton at self.view.frame.size.width/2 how can I make it reposition if the view changes size?

Thanks Tom


Set the button's autoresizingMask to UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜