OGeek|极客世界-中国程序员成长平台

标题: ios - xcode,ios,无法在屏幕上移动按钮 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 11:07
标题: ios - xcode,ios,无法在屏幕上移动按钮

控制台输出:

2015-07-02 17:31:49.105 Make Maths Fun[15079:90b] but_1.center.x = 155.000000 but_1.center.y = 90.000000

2015-07-02 17:31:49.105 Make Maths Fun[15079:90b] but_2.center.x = 155.000000 but_2.center.y = 140.000000

代码:

but_1.center = CGPointMake(155, 90);
but_2.center = CGPointMake(155, 140);

截图:

enter image description here

输出说它在那个 x 和 y 但是当我运行程序时它们是我在 viewcontroller

上的位置



Best Answer-推荐答案


试试这个

禁用使用自动布局选项,然后重试。

希望对你有帮助。

关于ios - xcode,ios,无法在屏幕上移动按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31176434/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://jike.in/) Powered by Discuz! X3.4