简体   繁体   English

UIView在其Superview内部移动

[英]UIView moving inside its Superview

The problem is inside of moving a subview inside of its superview. 问题出在将子视图移到其父视图内部。 Basically, I thought it would move only inside of its superview and once any part was over is would't be visible. 基本上,我认为它只会在其父视图内移动,并且一旦任何部分结束就将不可见。 But seems I'm wrong since the subview moves over the whole visible area. 但是似乎我错了,因为子视图在整个可见区域上移动。

What I do is simply change frame's origin of the subview. 我要做的只是更改子视图的框架原点。 What can be wrong? 有什么事吗

将父视图的clipsToBounds属性设置为YES / true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM