문제

I am new to iOS development. Now I am implementing an UIPanGestureRecognizer model application. I have one UIButton for UIPanGestureRecognizer. My question is, how can access the reside coordinate of UIButton from the super view (such as UIView, UIScrollView etc?)

if anybody know please help me.

도움이 되었습니까?

해결책

You may use

CGRect rectInSuperView = [button convertRect:button.frame toView:superview];

Check the documentation

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top