I am setting the frame of a UITableView in viewDidLoad, also after the device is rotated to ensure that it remains in the proper location. Here is my code:
- (void)viewDidLoad
{
[self setItemBoundaries];
}
- (void) setItemBoundaries {
if (UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)) {
self.raceTable.frame = CGRectMake(20,502,728,472);
}
else {
self.raceTable.frame = CGRectMake(20,20,492,708);
}
}
- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
[self setItemBoundaries];
}
However when the app loads, the table is sized incorrect (only on landscape mode): 
After rotating through portrait back to landscape, it looks fine: 
What am I doing wrong?
put the
-setItemBoundariesinto the-viewWillAppear:methodand:
and violá…