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 并添加了几个 CALayers 作为视图层的子层。甚至可以与视图一起调整子层的大小吗?当我通过设置新框架来调整图层大小时,只有视图的图层会获得新的大小,而子图层不会。我将图层的 setNeedsDisplayOnBoundsChange 设置为 true,并将 contentsGravity 设置为 kCAGravityResizeAspect,但到目前为止没有任何帮助。我错过了一些非常明显的东西吗?
谢谢和亲切的问候,汉斯