viewDidLoad warning and exe problem?


#1

Howdy all;

My code, as per book, up to page 108 includes:

-(void)viewDidLoad { [super viewDidLoad]; [[self view] setBackgroundColor:[UIColor orangeColor]]; }

The code compiles and runs but I get a blank white window with a black bottom row; no views and no tabbed controllers. Using some NSLog statements I see that viewDidLoad does not in fact execute. Where should I look to investigate this?

Thompson


#2

Well, user error of course. I had the following lines…

tabBarController = [[UITabBarController alloc] init]; [tabBarController setViewControllers:viewControllers];

…transposed…

[tabBarController setViewControllers:viewControllers]; tabBarController = [[UITabBarController alloc] init];

Thanks debug with break points! Although I am just ever so slightly curious as to why the spec allows setViewControllers to happen without an object init first? My expectations are that that would be bad.

Thompson


#3

Where by did you get the data from?