我正在尝试创建一个 UILabel 并使用 label.center = view.center
将其设置为 View 的中心.但我想将它向上移动 100 像素。
我该怎么做?
像,label.frame = CGRectMake(current-x, 100, 42, 21);
这可能吗?保留x
相同,但更改 y
?
最佳答案
这样做:label.center = CGPointMake(view.center.x, view.center.y - 100);
.
关于ios - 在 UIView 中将 UILabel 的中心向上移动。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17092758/