UIView autoresize problem
I have a UIView with several subviews: one UIImageView and a couple of UIViews. When I ch开发者_JAVA技巧ange the frame property of the view, the imageView's size changes accordingly, but the rest of the subviews remain in their original size!
I can't figure out what I'm doing wrong. Can anybody help?
Thanks,
Check Autoresizing in IB or code for each of your views.
First make sure autoresizesSubviews property of uiview is true.
If that does not work you can resize all subviews by "hand":
for (UIView *m_subview in [uiview subviews]) {
m_subview.frame = newSizeFrame;
}
精彩评论