Question: ![enter image description here](https://i.stack.imgur.com/Dl6v9.png)

As show in Picture above UIView A & UIView C are Added on UIView B. for B ClipToBounds is YES so the Red area is not visible.

Is it possible to get Visible rectangle of A & C ( shown with Lines ) 

I need show Rectangle in visible area when I touches e.g View A. thats it.

![enter image description here](https://i.stack.imgur.com/wllxD.png)

Answer: 
You can get an intersection rect of the two rects by using [CGRectIntersection()](http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGGeometry/Reference/reference.html#//apple_ref/doc/uid/TP30000955-CH1g-F17157) method

```
CGRect intersectionRect = CGRectIntersection(viewA.frame, viewB.frame);
if(CGRectIsNull(intersectionRect)) {
   //Rects do not intersect
}

```
Use for this 

```
[UIView convertRect:<#(CGRect)#> fromView:<#(UIView *)#>]
[UIView convertRect:<#(CGRect)#> toView:<#(UIView *)#>]

```

And CGRectIntersection function