I have two png files that have some transparent areas in them. I want to check if the non transparent parts are colliding.
CGRectIntersectsRect doesn't work for me.
Is this possible?
I have two png files that have some transparent areas in them. I want to check if the non transparent parts are colliding.
CGRectIntersectsRect doesn't work for me.
Is this possible?
You don't provide much information about the context, but if performance isn't an issue you could just compare the images pixel by pixel to see where transparent and non-transparent pixels are overlapping.
See this answer here to see how to get access to the actual pixel information based on a UIImage. https://stackoverflow.com/a/7101544/974782
break it into 2 pieces:
get a outlining CGPath from the images
see, if the paths intersects each other.
For both you should find some codes.