Hi, all!
In my application, I want to find out wheather an image is over another image, and if it is then I have to swap that image with other i.e. bring the below rendered image on the front. For this, I'm writing below code :
CGRect rect_1=CGRectMake(rect1X, rect1Y, rectW, rectH);
CGRect rect_2=CGRectMake(rect2X, rect2Y, rectW2, rectH2);
if(CGRectIntersectsRect(rect_1, rect_2))
{
[ravanImage bringSubviewToFront:ravanImage1];
}
in which if ravanImage is over ravanImage1 then ravanImage1 should come above. But this' not working. Whereas it's detecting wheather a rect is over other or not correctly, it's not bringing the view to front.
Can anybody help me? Thanx in advance.