I have drawn a non-rectangular shape into a UIView subclass using core graphics. Now I want to make this shape "tappable", but not the areas of the UIView that is transparent. IE the UIView subclass background color is alpha 0. When the user taps off of the graphic itself, but still on the view, how do I test this so I can do an appropriate action, or not?
Asked
Active
Viewed 88 times
1
-
There may be other ways but the only way I can think of for this to work is to test if px color != background color (or test alpha). There are some Q+As here @ getting px color. – spring Jul 10 '12 at 02:58
-
Thanks. I am searching for those Q and As now. – OWolf Jul 10 '12 at 03:12
-
Some details in the links here: http://stackoverflow.com/questions/4616778/ios-detect-the-color-of-a-pixel – spring Jul 10 '12 at 03:19
-
[this will help you](http://buildmobile.com/creating-a-graph-with-quartz-2d-part-4/) – Bala Jul 14 '12 at 09:42