1
iPhone/Objective-C 프로그래밍을 처음 사용합니다. 나는 UIImageView * myImage x, y, 너비, 높이 CGRect 값 (2020100100) 또는 무엇이든 사용하여 설정되어;copy uiimageview from CGPoint
Q1) 다음과 같이하면 왜 원점 값을 CGPoint로 가져올 수 없습니까?
CGPoint myPoint = myImage.frame.origin;
NSLog(@"X:%f Y:%f",mypoint.x, mypoint.y) // Prints X: 0.0 and Y: 0.0 instead of X:20.0 and Y: 20.o
NSLog(@"X:%f Y:%f",myImage.frame.origin.x, myImage.frame.origin.x) // Prints X: 20.0 and Y: 20.0
NSLog 위의 문은 myPoint에 대한 예상 값을 인쇄하지만 myImage.frame.origin에 대한 올바른 값을 출력하지 않습니다. 왜?
Q2) 왜 @property를 CGPoint로 설정할 수 없습니까?