Subview displaying outside the bounds of the parent UIView

后端 未结 2 636
日久生厌
日久生厌 2021-02-06 23:45

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.

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 00:26

    Programmatically

    [YourSuperview setClipsToBounds:YES]

提交回复
热议问题