답변

0

당신은 documentation

+0

이 재생 주셔서 감사합니다

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

확인 사용할 수 있습니다. 나는 UIButton의 정확한 좌표를 얻을 수 없다. 나의 경우 UIButton 좌표는 (109,176,72,37)이지만 convertRect : toView : 반환 값은 (218,352,72,37)이고, 값 변경의 이유는 무엇인가? – John

+0

코드를 CGRect로 변경합니다. rectInSuperView = [[button superview] convertRect : button.frame toView : Yourview]; – John