I have a UIScrollView and a UIPageControl in my iPad app. I've placed them in the .xib file. My app supports landscape view only.

I try to set the width and height in code and it never looks right. I have a very simple case with 5 pages each set to a different color background to make sure my pages look right, but they never do, the colors overlap no matter what I do.

So my question is:

1. How can I set the size right in code (viewDidLoad?)?
2. Do I need to set the size for both UIScrollView and UIPageControl?

Thanks in advance.