Tus*_*ani 6 cocoa-touch objective-c ios4
我想以编程方式获取UILabel的位置.我怎么能这样做,即得到UILabel的x和y?
我试过textAlert.center.y或textAlert.center.x(textalert是UILabel的名字).
Dee*_*olu 10
这是frame您正在寻找的财产.试试吧.
textAlert.frame.origin.x
textAlert.frame.origin.y
textAlert.frame.size.width
textAlert.frame.size.height
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4408 次 |
| 最近记录: |