开发者

How to make a parent view autoresize based on subview for iPhone?

I have a UIScrollView and a开发者_如何转开发 subview in it. I would like to swap subviews and have the scroll view automatically resize its content view to the size of the subview.

Any suggestions on how I may do this? Thanks.


add -(void)layoutSubviews to your class. Whenever u swap the subviews, this would get called. There you take the size of the subview and you can set the content size of the scrollview.

Not exact reference. But u can know something from here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜