开发者

UIView initWithFrame overwrite view height

I have a UIView with a 开发者_运维技巧NIB. The view in the NIB is set to 280 x 390.

When I add the View inside another view I "something" do this

view_name *view = [view_name alloc] initWithFrame:CGRectMake(0, 0, 280.00, 390.00) ];

[outer_view addSubview: view];

Now in certain instances I need to make the view smaller as there is other content on the page. I tried to change the initWithFrame variables but it does not work.

How can I do this? Cheers!


put a uiscrollview, set its size to your desired one, and add your view as a subview to the scrollview.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜