I have a UIView that contain another subview. The subview\'s frame is outside of the bounds of the super view. But the entire subview is visible in when I run the application.
If you're setting up your views in code, set the clipsToBounds
property of the superview to YES
.
If you're setting up your views in a nib, turn on the “Clip Subviews” checkbox on the superview. It's off by default, as in this screenshot:
Programmatically
[YourSuperview setClipsToBounds:YES]