在一个场景中,我有一个 UIButton _btnBuffalo(除其他外),在实用程序检查器中有这些坐标:
在我的 ViewController 中,我试图让按钮像这样:
CGRect btnRect = _btnBuffalo.bounds;
不幸的是,我用 NSLog 得到了这个结果:
btnRect x: 0.000000, y: 0.000000, w: 160.000000, h: 120.000000
我真的明白为什么 x 和 y 是 0.000000,有什么想法吗?