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,可以说 100px 高,其中我有另一个 UIView,可以说 50px 高。如果将主 UIView 设置为 20px 高,则 50px 高的一个是完全可见的。我认为这可能与边界有关,所以我设置了它,它没有什么不同。
抱歉,如果在其他地方回答了此问题,但找不到与此相关的任何内容。
在“父”视图中,将clipsToBounds属性设置为 YES。
clipsToBounds