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.
我是 iOS 开发的新手。现在我正在实现一个UIPanGestureRecognizer模型应用程序。我有一个UIButton。UIPanGestureRecognizer我的问题是,如何UIButton从超级视图访问驻留坐标(例如UIView,UIScrollView等?)
UIPanGestureRecognizer
UIButton
UIView
UIScrollView
如果有人知道请帮助我。
您可以使用
CGRect rectInSuperView = [button convertRect:button.frame toView:superview];
检查文档