fabian
fabian

Reputation: 5463

Make a ViewController scrollable?

i was wondering how to make a ViewController (or TTViewController) scrollable, e.g. for long pages?

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

Upvotes: 0

Views: 559

Answers (1)

Vladimir
Vladimir

Reputation: 170859

Put your view as a subview in UIScrollView and set scrollview's contentSize to fit your large page.

Upvotes: 3

Related Questions