1

I am having the user draw around on the screen. If his current point hits a certain pt:color in the UIView, than I want to execute something.

How to get the current point color from the UIView:image?

jdl
  • 6,151
  • 19
  • 83
  • 132
  • may be u can look in to this http://stackoverflow.com/questions/1285621/iphone-objective-c-how-to-get-a-pixels-color-of-the-touched-point-on-an-uiimag – Ashwin P Jan 29 '16 at 01:22
  • The bezier path seems irrelevant. Presumably you're following touches; then you have the touch point, and your model should hold the information about what color is where in your view. It's hard to be more specific without more specifics from you. – jscs Jan 29 '16 at 01:26
  • looking through it seems UITouch gets it off the bitmap... so I would have to render to a bitmap first. – jdl Jan 29 '16 at 01:45
  • seems simpler to create an array holding the shape positions and then with UIBezierpath, get the current coordinates and compare to the shapes, bypassing bitmaps and UITouch. – jdl Jan 29 '16 at 01:53
  • What is, if there a gaps between the points, because the user moves fast? – Amin Negm-Awad Jan 29 '16 at 03:57

0 Answers0