简体   繁体   English

如何创建锚定在视图底部的UIButton?

[英]How to create UIButtons anchored to the bottom of the view?

在代码中创建一些UIButton并固定到视图底部并在它们之间预定义间距的最佳实践是什么?

Use the buttons' autoresizingMask property. 使用按钮的autoresizingMask属性。 If the parent view's only going to resize vertically, then that can just be set to UIViewAutoresizingFlexibleTopMargin . 如果父视图仅要垂直调整大小,则可以将其设置为UIViewAutoresizingFlexibleTopMargin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM