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.
我的视图层次结构是
UIViewController.view
一个子视图(在一半大小的主视图和底部)
此子视图上的按钮
我想获取此按钮相对于我的主视图的坐标
此按钮的 CGRect 但根据 superview。
[self.view convertRect:button.frame fromView:button.superview];
采用
[view convertPoint:thePoint toView:subview];