Joey
Joey

Reputation: 149

Can't move the view of UIViewController for iPhone

I have a UIViewController subclass. I add many UILabel by using the [self.view addSubview:] method, and some labels exceed the bottom of the screen. However I can't move the view to see the labels below. Do I miss something? Thanks in advance.

Upvotes: 0

Views: 303

Answers (2)

zpesk
zpesk

Reputation: 4353

You need to be using a UIScrollView if you have content that exceeds the bounds of the screen (480 X 320 pixels).

Upvotes: 1

Rog
Rog

Reputation: 17170

As zPesk says, a UIScrollView is probably the best solution if you want to display content larger than the screen however there are simpler options.

Try setting the origin of your UIView to be negative - this will make is display offset within it's superView (which I'm assuming is your fullscreen window). Using this technique you could implement simple paging to get your app running initially before you move to a UIScrollView.

Upvotes: 0

Related Questions