how do i get a layer's frame to automatically resize based on its superlayer's frame or its view's f
Posted
by Kevlar
on Stack Overflow
See other posts from Stack Overflow
or by Kevlar
Published on 2010-05-26T17:06:31Z
Indexed on
2010/05/26
17:41 UTC
Read the original article
Hit count: 227
I'm experimenting with using cagradientlayer to draw gradients in our app instead of having a subclass of uiview manage gradients. One snafu that i've come across is that when the view that has the gradient as a sublayer of its main layer gets resized to fit the data i am trying to show, the layer doesn't resize along with it. I end up having the gradient layer end at the original frame size while my view's frame is much larger.
Is there a way to have the sublayer autoresize to fit its superlayer's frame, or the superlayer's view's frame?
© Stack Overflow or respective owner