title: Set Tableview y-position in a UIViewController when Keyboard shows
body: <p>I have a <code>TableView</code> inside a <code>UIViewController</code> created in Main.Storyboard.
  The Y-position is 0 when initialized. 
  My problem is, when the keyboard shows, the Y-Position of the <code>TableView</code> doesn't change at all. The Y-position stays at 0. So the cells get's hidden behind the NavigationController.</p>
  
  <p>The code so far:</p>
  
  <pre><code>-(void) keyboardWasShown:(NSNotification*)aNotification
  {
      if (kbIsShown == false) {
          NSDictionary* info = [aNotification userInfo];
          NSTimeInterval animationDuration;
          UIViewAnimationCurve animationCurve;
          CGRect keyboardFrame;
          [[info objectForKey:UIKeyboardAnimationCurveUserInfoKey] getValue:&amp;animationCurve];
          [[info objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&amp;animationDuration];
          [[info objectForKey:UIKeyboardFrameBeginUserInfoKey] getValue:&amp;keyboardFrame];
  
          [UIView beginAnimations:nil context:nil];
          [UIView setAnimationDuration:animationDuration];
          [UIView setAnimationCurve:animationCurve];
          NSLog(@"frame..%f..%f..%f..%f",self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height);
          NSLog(@"keyboard..%f..%f..%f..%f",keyboardFrame.origin.x, keyboardFrame.origin.y, keyboardFrame.size.width, keyboardFrame.size.height);
          [self.view setFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y - keyboardFrame.size.height, self.view.frame.size.width, self.view.frame.size.height)];
          [chatTable setFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y + keyboardFrame.size.height + TABBAR_HEIGHT, self.view.frame.size.width, self.view.frame.size.height-keyboardFrame.size.height)];
          [UIView commitAnimations];
          NSLog(@"Visar sig");
          kbIsShown = true;
      }
  }
  </code></pre>
  
  <p>The <code>[chatTable setFrame:]</code> doesn't do anything. The <code>TableViews (chatTable)</code> Y-position stays at 0. How can i change the Y-position of the Tableview so my content will be visible?</p>
  
  <p>Note: <code>[self.view setFrame...]</code> does actually change the Y-position of the view. But the <code>chatTable</code> stays at 0.</p>