title: Push view up when keyboard shown
body: <p>I need to push the entire up (it has scrollview) when keyboard shown
  but can't seem to get it working with this code.
  All the code being hit but it just doesn't push up the view.
  I am following the example here.
  <a href="http://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW7" rel="nofollow">http://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW7</a></p>
  
  <pre><code>    - (void)registerForKeyboardNotifications
  {
      [[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(keyboardWasShown:)
                                                   name:UIKeyboardDidShowNotification object:nil];
  
      [[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(keyboardWillBeHidden:)
                                                   name:UIKeyboardWillHideNotification object:nil];
  
  }
  
  // Called when the UIKeyboardDidShowNotification is sent.
  - (BOOL)textFieldShouldReturn:(UITextField *)textField
  {
      [textField resignFirstResponder];
  
      return YES;
  }
  
  
  - (void)textFieldDidBeginEditing:(UITextField *)textField
  {
      self.activeField = textField;
  }
  
  - (void)textFieldDidEndEditing:(UITextField *)textField
  {
      self.activeField = nil;
  }
  - (void)keyboardWasShown:(NSNotification*)aNotification
  {
      NSDictionary* info = [aNotification userInfo];
      CGSize kbSize = [[info objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
  
      UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, kbSize.height, 0.0);
      self.scrollView.contentInset = contentInsets;
      self.scrollView.scrollIndicatorInsets = contentInsets;
  
      // If active text field is hidden by keyboard, scroll it so it's visible
      // Your application might not need or want this behavior.
      CGRect aRect = self.frame;
      aRect.size.height -= kbSize.height;
      if (!CGRectContainsPoint(aRect, self.activeField.frame.origin) ) {
          CGPoint scrollPoint = CGPointMake(0.0, self.activeField.frame.origin.y-kbSize.height);
          [self.scrollView setContentOffset:scrollPoint animated:YES];
      }
  }
  
  // Called when the UIKeyboardWillHideNotification is sent
  - (void)keyboardWillBeHidden:(NSNotification*)aNotification
  {
      UIEdgeInsets contentInsets = UIEdgeInsetsZero;
      self.scrollView.contentInset = contentInsets;
      self.scrollView.scrollIndicatorInsets = contentInsets;
  }
  </code></pre>