Clip subviews content out of bounds

Clip subviews content out of bounds

In iOS when you want to clip part of the subviews that are out of the bounds you just set clipsToBounds = YES; in the parent view.

In Android you set setClipChildren(true); in the ViewGroup.

React Native tries to mimic CSS with their own implementation of it, so you can set the property overflow: 'hidden' in the view's style.

Easy as pie!

 

posted @ 2017-03-07 15:39  NOIP/NOI辅导  Views(274)  Comments(0Edit  收藏  举报