tags:

views:

176

answers:

0

I'm trying to go nibless on the "View Switcher" program from Beginning iPhone Development and I'm running into a couple of problems.

Here's the source code.

1) The first time I switch to the "yellow" view the button kind of "slides" in.
2) The view doesn't fill up the whole screen.

Basically, I just have a BlueViewController and a YellowViewController which are subclasses of a UIViewController. I override -loadView and setup the view and add a button as a subview. The main class that swaps these is a SwitchViewController which is also a subclass of UIViewController. The SwitchViewController puts a toolbar with a bar button item that just swaps the two views (it determines which view is currently visible, removes that one, and adds the other one).

Any ideas? (Please tell me if you need more details, though if you run the program it's pretty easy to see the problems)