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.
精彩评论