6

iPhone Objective C: How to get a pixel's color of the touched point on an UIImageView, even if the parent UIView or itself is being rotated by the CGAffineTransformMakeRotation function?

Will the view property of the UITouch still correctly return the correct pixel of the touched point even if the UIView/UIImageView is being scaled and rotated?

Many thanks for reading

edited: Thanks for the answer & comments, but sorry I still don't know how to get the X,Y point of the scaled/rotated image from the touch event, and then extract the color from it. Would anyone mind to help?

Paras Joshi
  • 20,427
  • 11
  • 57
  • 70
Unreality
  • 4,111
  • 11
  • 48
  • 67

1 Answers1

10

A quick google search has revealed some promising leads:

Community
  • 1
  • 1
Dave DeLong
  • 242,470
  • 58
  • 448
  • 498
  • thanks a lot for the link. But I'm still wondering whether these all will still work or not if the UIView is being scaled and rotated. – Unreality Aug 17 '09 at 01:07
  • best to find out, is to try, try again! i used the first option in some of my own work! – James Hall Aug 17 '09 at 01:50
  • Sorry I still don't know how to get the X,Y point of the scaled/rotated image from the touch event, and then extract the color from it. Would anyone mind to help? – Unreality Aug 17 '09 at 16:33
  • By reading the provided links, I can't find any clues on how to extract the X,Y point of the scaled/rotated image from the touch point. – Unreality Aug 17 '09 at 16:35