Tab Bar Errors 22 June 2009
Posted by ojmason in Apple, iphone, objective-c, programming.trackback
DAY 9 and more frustration. My ViewControllers didn’t seem to be called, and NSLog messages I put in didn’t appear on the console. And the whole thing crashed without me knowing what was going on.
Having another look at my iPhone development book, I realised the first mistake: the TabBar Controller wasn’t aware of which controllers to call up for the various tabs, something you need to set up in Interface Builder. Still don’t really like that way of doing things, as the fact you’ve done it (or not, as the case may be!) is not easily transparent.
After completing the tab bar attributes, the log messages suddenly turned up, which was good, and it also doesn’t crash. Well, at least not where it used to crash. Now it crashes in the loop where I read stuff out of the SQLITE database, and it crashes after the second iteration. Wonder what the cause is. Probably memory management. Mixing Objective-C and plain C makes things a bit confusing. And I don’t like that NSString is an object you need to allocate, but NSInteger is basically just an alias for int, so a primitive data type rather than an object.
Anyway, more bug hunting coming up. It all feels terribly slow, but then I’m only spending a few hours every couple of weeks on it at the moment.
Comments»
No comments yet — be the first.