Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个需要添加子视图的uiview,子视图的宽度是父视图宽度的两倍,我不希望这个suview溢出,我需要隐藏溢出的区域,我该如何实现?
你可以使用这个:
view.clipsToBounds = YES;
对于您的超级视图 - 具有子视图的视图,调用消息
[*SUPERVIEW* setClipsToBounds:YES];