title: Horizontal UIScrollView and bunch of UIButtons
body: <p>I need help with the application I am trying to create, in which I have a <code>UIScrollView</code> and <strong>three</strong> <code>pages</code>.</p>
  
  <p>The problem is that <code>buttons</code> 'FOO' and 'BAR' are loaded in the first page, instead it should be loaded in the second page only. </p>
  
  <p>So, the project should be like this:</p>
  
  <blockquote>
  <pre><code>\--View  (The underlying UIView)
      \--scrollView (The UIScrollView)
          \--button (The buttons)
  </code></pre>
  </blockquote>
  
  <p>and</p>
  
  <pre><code>- (void)createButton
  {
      float xButton = 10.0;
      NSArray *buttonTitles = @[@"foo", @"bar"];
  
      for (int i = 0; i &lt; 2; i++) {
          UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
          button.frame = CGRectMake(xButton, 10.0, 100.0, 50.0);
  
          [button setTitle:buttonTitles[i] forState:UIControlStateNormal];
          [button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchDown];
          [scrollView addSubview:button];
          [button setTag:i];
  
          xButton += 200;
      }
  }
  </code></pre>
  
  <p>I have a <code>UIView</code> with three horizontal <code>UIScrollViews</code>. What I want to do is, the buttons are to be displayed in the second view. But every time I launch the application, the buttons are already loaded in the first view, and not in the second view.</p>
  
  <pre><code>__________        __________        __________
  |        |        |        |        |        |
  |  1st   |  &lt;---  |  2nd   |  &lt;---  |  3rd   |
  | page   | scroll | page   | scroll | page   |
  |        |        |        |        |        |
  |________|        |________|        |________|
  </code></pre>
  
  <p>How will I load the buttons in the second page, and won't reappear in the first and third page? It seems that by checking the <code>currentPage</code> of <code>UIPageControl</code> won't work.</p>
  
  <p>In addition, what are needed to be done in order for my second page to be displayed first whenever I launch the application?</p>