iPhone:UIScrollView with Paging in Landscape Mode Issue
<p>I am build an app in <strong>Landscape mode only</strong> and I have an issue is that not fill up color with width in a <strong>Landscape mode</strong> in iPhone but I can't understand how can i do that so please give me some idea to develop this functionality.</p>

<p>Refer <a href="https://github.com/cwalcott/UIScrollView-Paging" rel="nofollow">https://github.com/cwalcott/UIScrollView-Paging</a></p>

<p>Thanks in advance.</p>

<pre><code>// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad 
{
    pageControlBeingUsed = NO;

    NSArray *colors = [NSArray arrayWithObjects:[UIColor redColor], [UIColor greenColor], [UIColor blueColor], nil];
    for (int i = 0; i &lt; colors.count; i++) 
    {
        CGRect frame;
        frame.origin.x = self.scrollView.frame.size.width * i;
        frame.origin.y = 0;
        frame.size = self.scrollView.frame.size;

        UIView *subview = [[UIView alloc] initWithFrame:frame];
        subview.backgroundColor = [colors objectAtIndex:i];
        [self.scrollView addSubview:subview];
        [subview release];
    }

    self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * colors.count, self.scrollView.frame.size.height);

    self.pageControl.currentPage = 0;
    self.pageControl.numberOfPages = colors.count;

    [super viewDidLoad];
}

- (void)scrollViewDidScroll:(UIScrollView *)sender 
{
    if (!pageControlBeingUsed) 
    {
        // Switch the indicator when more than 50% of the previous/next page is visible
        CGFloat pageWidth = self.scrollView.frame.size.width;
        int page = floor((self.scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
        self.pageControl.currentPage = page;
    }
}

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView 
{
    pageControlBeingUsed = NO;
}

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 
{
    pageControlBeingUsed = NO;
}

- (IBAction)changePage 
{
    // Update the scroll view to the appropriate page
    CGRect frame;
    frame.origin.x = self.scrollView.frame.size.width * self.pageControl.currentPage;
    frame.origin.y = 0;
    frame.size = self.scrollView.frame.size;
    [self.scrollView scrollRectToVisible:frame animated:YES];

    // Keep track of when scrolls happen in response to the page control
    // value changing. If we don't do this, a noticeable "flashing" occurs
    // as the the scroll delegate will temporarily switch back the page
    // number.
    pageControlBeingUsed = YES;
}
</code></pre>

<p><img src="http://i.stack.imgur.com/Q1ELZ.png" alt="enter image description here"></p>
