title: resizing uitableview on orientation change does not resize correctly
body: <p>I cannot resize the uitableview properly when changing the orientation of the screen. I can make one orientation work fine but not both.
  I've tried 2 different methods: 1) using the autoresizingMask on the tableview and 2) using the layoutSubviews method and here are the results of each:</p>
  
  <p>1) using the autoresizing almost works if I use </p>
  
  <pre><code>self.myTableView.autoresizingMask =  UIViewAutoresizingFlexibleTopMargin |UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleBottomMargin;
  </code></pre>
  
  <p>It shows correctly when in portrait and then I move to landscape it also shows correctly but not all the way to the end of the screen. In landscape I see a space on the left side and on the right side.
  So, I thought let's just add the UIViewAutoresizingFlexibleWidth to the line of code above. It does make the uitableviewcell expand to the full screen in landscape but when I change the orientation it  does not maintain the same cell on the screen and sometimes it displays half of one cell and half of another cell in the middle of the screen.</p>
  
  <p>2) Using auto layout. I get the same behavior as above when I use this code:</p>
  
  <pre><code>-(void)layoutSubviews {
  
    [super layoutSubviews];
      onLoadSize=self.contentView.bounds.size;
      self.myTableView.frame = CGRectMake(0, 0, onLoadSize.width, onLoadSize.height);
      self.selectedBackgroundView.frame = self.myTableView.frame;
  }
  </code></pre>
  
  <p>If I add an if statement testing for the orientation, then it works fine for that orientation in specific but not the other. If I test for both orientations I get the same behavior as described above.</p>
  
  <p>Any help will be very welcome.</p>
  
  <p>Thanks!</p>