Checking if two images views are intersecting when moving?

The first thing I would do is output some NSLog to the debug area (from your imageviewcoordinates method).

The first thing I would do is output some NSLog to the debug area (from your imageviewcoordinates method): NSLog(@" self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame.origin. X : %f ", self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame.origin. X); NSLog(@" self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame.origin.

Y : %f ", self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame.origin. Y); NSLog(@" self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame.size. Width : %f ", self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame.size.

Width); NSLog(@" self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame.size. Height : %f ", self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame" rel="nofollow">self.detectrect.frame.size. Height); NSLog(@" self.circleView.frame.origin.

X : %f ", self.circleView.frame.origin. X); NSLog(@" self.circleView.frame.origin. Y : %f ", self.circleView.frame.origin.

Y); NSLog(@" self.circleView.frame.size. Width : %f ", self.circleView.frame.size. Width); NSLog(@" self.circleView.frame.size.

Height : %f ", self.circleView.frame.size. Height); To ensure you are getting some values you can compare and so you can see why the CGRectContainsRect is failing.

Yup I checked it I am doing NSLog(@" x=%f ",circleView.frame.origin. X); bt I am getting same value each time as I am moving? Its 30 what would be the problem bt I can see that image view is moving?

Why this strange behavior? – Amrut Dec 15 at 10:40 Try setting the frame after you add the subviews. You should create the uiview, add it to view hierarchy(subview in your case), set initial position/frame and then animate.

– ade Dec 15 at 11:09 hey ade I tried that bt not working following is the whole code with animation for circular movement of image view – Amrut Dec 15 at 11:19 CAKeyframeAnimation *pathAnimation = CAKeyframeAnimation animationWithKeyPath:@"position";pathAnimation. CalculationMode = kCAAnimationPaced;pathAnimation. FillMode = kCAFillModeForwards;pathAnimation.

RemovedOnCompletion = NO;pathAnimation. Duration = 3.0;pathAnimation. RepeatCount = 10;CGMutablePathRef curvedPath = CGPathCreateMutable();450);CGPathAddArc(curvedPath, NULL, 160,260, 160/2,0,45*M_PI*2, YES); pathAnimation.

Path = curvedPath;CGPathRelease(curvedPath); – Amrut Dec 15 at 11:21 Your UIView is not moving. You are animating your UIView's core animation layer not the view itself. You need to either animate the view instead of the layer or detect the intersection of the layers.

– ade Dec 15 at 11:58.

After that I found solution to and in one of theard its Circular Rotation Of five buttons maintaining equal distance really a simple and a great answer works oswome Thanks Amrut.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions