I have a some movable views in the user interface and I need to know if the moving view's frame touched any of the other view's frame and if touched I need to merge these two views into a single view.
i have added a sample image down here
I have a some movable views in the user interface and I need to know if the moving view's frame touched any of the other view's frame and if touched I need to merge these two views into a single view.
i have added a sample image down here
You can useCGRectIntersectsRect
method. Get the bounds of two views and use this method
rect1 = self.view1.bounds;
rect2 = self.view2.bounds;
CGRectIntersectsRect(CGRect rect1, CGRect rect2)