I have an iphone app. The view is consists of two children: a tableview 400 pixels tall and a uitextview at the bottom of the view that is about 80 pixels tall. 

I am trying to move the textview and tableview upwards when the keyboard is visible. I resized the "main" view to make it smaller. Why don't its children appear to resize as well? 
Do I need to readjust the frame of the tableview, and readjust the frame of the textview as well? I'm just wondering what the expected behavior is. Do I need to use setNeedsLayout() or setNeedsDisplay?

I expected that by downsizing the "main" view, its children would be "shrunk" and constrained by their parent view as well. It looks like the textview remains at the bottom of the screen. The tableview appears to be correct (it shrunk), but the textview doesn't look like it moves. Although in the new shrunken view there is now a white area where the textview *should* move to. 

```
// Called when the UIKeyboardDidShowNotification is sent.

```

- (void)keyboardWasShown:(NSNotification\*)aNotification {

```
NSLog(@"keyboard was shown");
NSDictionary* info = [aNotification userInfo];
CGSize kbSize = [[info objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
//CGRect keyboardFrame = [[info objectForKey:UIKeyboardFrameEndUserInfoKey]CGRectValue];
NSLog(@"kb size is:%f",kbSize.height);

//UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, kbSize.height, 0.0);

CGRect newFrame = self.view.frame;
//20 status bar height, 44 is nav bar height
newFrame.size.height = 480 -20 - 44 - kbSize.height;

self.view.frame = newFrame;
self.view.layer.borderWidth = 1.0f;
self.view.layer.borderColor = [[UIColor redColor] CGColor]; 

[self.view setNeedsLayout];
[self.view setNeedsDisplay];

```

}