aroooo
aroooo

Reputation: 5066

Filling a UIScrollView w/ PageControl within a view

I'm trying to create a paginated UIScrollView within a view that only scrolls horizontally and is populated by labels. There are 4 labels and each label shows a string derived from a NSDate, with each one being linked to a PageControl to show which page the user is on.

I'm having a little trouble trying to figure this out based on sample code and other answers.

If I've already dragged out the dimensions on IB, do I still need to specify the frame and such?

Do I then have to create views with labels on them? Or can I simply create labels and populate the UIScrollView?

Is there any way to get the background of the UIScrollView transparent?

Upvotes: 0

Views: 266

Answers (1)

James
James

Reputation: 2282

You can add UILabels directly to the scroll view as they are a subclass of UIView. If you have already specified the size and position of a view in IB, you do not need to do it again programmatically, although you may. myScrollView.backgroundColor = [UIColor clearColor]; will make your UIScrollView transparent.

Upvotes: 1

Related Questions