Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何向下移动按钮位置?我有一个 UISwitch 打开时,它会显示一些东西,但这会覆盖我的一个按钮。如何向下移动按钮以使其不重叠?
将按钮的框架设置到新位置。例如,这会将按钮向下移动 100 像素:
myButton.frame = CGRectOffset(myButton.frame, 100.0, 0);