title: How to make UIButton move with UIScrollView
body: <p>I have a <code>UIScrollView</code> menu that moves above and below the viewport via the activation of a <code>UIButton</code>. The issue is that the button only stays in one place when I press it to make the <code>UIScrollView</code> menu move up and down. I want the <code>UIButton</code> to say <strong>above</strong> the <code>UIScrollView</code> menu when it is activated. Here's what it looks like, the "open" is the <code>UIButton</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/Hp8hf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hp8hf.png" alt="enter image description here"></a></p>
  
  <p>Here are the animation codes from the <code>viewcontroller.m</code> for the <code>UIScrollView</code> and <code>UIButton</code>.</p>
  
  <pre><code>#import "ViewController.h"
  
  @interface ViewController ()
  
  @end
  
  @implementation ViewController
  @synthesize scrollView;
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
      draw1 = 0;
      scrollView.frame = CGRectMake(0, 300, 480, 55);
      [scrollView setContentSize:CGSizeMake(480, 55)];
  
      openMenu.frame = CGRectMake(220, 270, 60, 30);
  }
  
  - (IBAction)OpenMenu:(id)sender {
      if (draw1 ==0) {
          draw1 = 1;
          [UIView animateWithDuration:0.5
                                delay:0.0
                              options: UIViewAnimationOptionCurveEaseOut
                           animations:^{
                               scrollView.frame = CGRectMake(0, 1000, 568, 200);
                               openMenu.frame = CGRectMake(220, 200, 60, 30);
                           }
                           completion:^(BOOL finished){
                               NSLog(@"Done!");
                           }];
      } else {
          draw1 = 0;
          [UIView animateWithDuration:0.5
                                delay:0.0
                              options: UIViewAnimationOptionCurveEaseOut
                           animations:^{
                               scrollView.frame = CGRectMake(0, 300, 568, 200);
                               openMenu.frame = CGRectMake(220, 270, 60, 30);
                           }
                           completion:^(BOOL finished){
                               NSLog(@"Done!");
                           }];
      }
  }
  </code></pre>
  
  <p>I want the "open" button to be above the green <code>UIScrollView</code> (not on top of it), how do I do this?</p>