简体   繁体   English

使ViewController可滚动?

[英]Make a ViewController scrollable?

i was wondering how to make a ViewController (or TTViewController) scrollable, eg for long pages? 我想知道如何使ViewController(或TTViewController)可滚动,例如用于长页面?

My first try (make the frame bigger) doesnt work. 我的第一次尝试(使框架更大)不起作用。

CGRect appFrame = [UIScreen mainScreen].applicationFrame;
CGRect frame = CGRectMake(0, 0, appFrame.size.width, appFrame.size.height + 200);
self.view = [[[UIView alloc] initWithFrame:frame] autorelease];

thanks 谢谢

将视图作为子视图放在UIScrollView并设置scrollview的contentSize以适合您的大页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM