gpt4 book ai didi

ios - 使 UIView 越界但仍然可见

转载 作者:行者123 更新时间:2023-11-29 00:43:19 25 4
gpt4 key购买 nike

我需要一个 UIView 超出 super View 范围但仍然可见。如果我将它移出边界,它就会被切断。

最佳答案

很可能 superview 将 clipsToBounds 设置为 true。以下是 Apple 文档中关于该属性的内容:

A Boolean value that determines whether subviews are confined to the bounds of the view.

Discussion Setting this value to YES causes subviews to be clipped to the bounds of the receiver. If set to NO, subviews whose frames extend beyond the visible bounds of the receiver are not clipped. The default value is NO.

要使边界外的 subview 可见,请尝试 myView.clipsToBounds = false

关于ios - 使 UIView 越界但仍然可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38963969/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com