开发者

UI elements - make position fluid?

开发者 https://www.devze.com 2023-01-21 02:01 出处:网络
I realise you can make dimentions fluid by using the autoresizing mask to give a flexible width/height.

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

精彩评论

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