title: Confused to why my UISCrollView's frame is null
body: <p>I started out with an empty project and added a view controller along with its nib. Inside the nib, there is a view with a UIScrollView as the view's child. Inside the scrollview, I have multiple assets like textfields, labels and buttons.</p>
  
  <p>I am at the point where I want my scrollview to move up when the keyboard shows up. I looked up on stackoverflow on how to do this. I basically copied the code and tried to understand it. However, the view is still not moving up. So time for some debug statements....</p>
  
  <p>My UIScrollView is hooked up (IBOutlet) to the RootViewController and is accessible from there. I tried printing out my scrollView (the instance name) and I got an object. However, when I tried printing out scrollView.frame.... I got null... does anyone have any idea to why this is?</p>
  
  <p>Here is some code snippet with some of my debug statements</p>
  
  <pre><code>- (void) moveScrollView:(NSNotification *) notification up: (BOOL) upFlag{
      NSDictionary * userInfo = [notification userInfo];
  
      NSTimeInterval animationDuration;
      UIViewAnimationCurve animationCurve;
      CGRect keyboardEndFrame;
  
      [[userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] getValue:&amp;animationCurve];
      [[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&amp;animationDuration];
      [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] getValue:&amp;keyboardEndFrame];
  
      [UIView beginAnimations:nil context:nil];
      [UIView setAnimationDuration:animationDuration];
      [UIView setAnimationCurve:animationCurve];
  
      CGRect newFrame = scrollView.frame;
      CGRect keyboardFrame  = [self.view convertRect:keyboardEndFrame toView:nil];
      NSLog(@"scrollView: %@", scrollView);
      NSLog(@"frame: %@", scrollView.frame);
      NSLog(@"Old Height: %@", scrollView.frame.size.height);
  
      newFrame.size.height -= keyboardFrame.size.height * (upFlag ? 1 : -1);
      NSLog(@"New Height: %@", newFrame.size.height);
      scrollView.frame = newFrame;
  
      [UIView commitAnimations];
  }
  
  - (void) keyboardShow:(NSNotification *) notification{
      NSLog(@"Keyboard Show");
      [self moveScrollView: notification up:YES];
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/VucxT.png" alt="Nib"></p>