I've got a really strange bug in my project. I've got a UIScrollView as my main, big view.  Inside of it, I have a UIViewController (not UITableViewController) which has a UITableView instance variable, as well as some miscellaneous UIButtons. I have set the view controller's view frame to CGRectMake(0, 64, 320, 388), as I have a tab bar above it (this is not functional yet).  At first it works great and looks great, but once I present and dismiss a modalViewController (thus reloading the UIViewController, I believe), it pushes the UIViewController's view to the top of the screen (by default setting it to CGRectMake(0, 0, 320, 460), but since I've set wantsFullScreenLayout to NO, it now sets it to CGRectMake(0, 0, 320, 388).
I've tracked this problem to somewhere between viewWillAppear and viewDidAppear.  Here are my exact logs after dismissing the modalViewController:
2011-05-06 11:08:39.974 Campus[1570:207] Frame is 0.000000, 64.000000, 320.000000, 388.000000 (viewWillAppear)
2011-05-06 11:08:40.378 Campus[1570:207] Frame is 0.000000, 0.000000, 320.000000, 388.000000 (viewDidAppear)
As you can see, the frame is fine in viewWillAppear, but not in viewDidAppear.
I've done the following things to try to fix it:
- Set the desired frame in loadView, viewDidLoad, viewWillAppear, and viewDidAppear.
- Set my wantsFullScreenLayout to NO.
- Killed my [super viewWillAppear:] and [super viewDidAppear:] calls in my method overrides.
What should I do?!?!?