开发者

UIView layer not resizing with view?

I added a CAGradientLayer to a custom UIView subclass's layer. I set the UIView autoresizing mask to UIViewAutoresizingFlexibleWidth. However the view resizes fine but the layer's frame does not resize?? Is there a way to make that layer automatically resize when its view resizes?

Its pretty easy to fix this by manually resizing the layers frame but i would rather figure out 开发者_如何学Gowhy its not automatically resizing on its own.

thx


there's no layout manager in iOS. You need to resize your custom layers in your layoutSubviews.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜