我想知道 TouchImageView 中预定义的 2 个点的最终坐标。1.如果我只是移动touchimageview,这些代码是可以的。2. 但如果我缩放或旋转 touchimageview,ptLeft 和 ptRight 不正确。
CGPoint ptLeft = CGPointMake (100, 100);
CGPoint ptRight = CGPointMake (200, 200);
TouchImageView *touchView = [[TouchImageView alloc] initWithFrame:rect];
....
....
/***** get the coordinate after TouchImageView has been scaled or rotated *****/
ptLeft = CGPointApplyAffineTransform(ptLeft, touchView.transform);
ptRight = CGPointApplyAffineTransform(ptRight, touchView.transform);
这里是touchimageview源码 ——TouchImageView源码