Marching right along at a good clip this week is Chapter 7 in the Big Nerd Ranch Guide, titled View Controllers. This chapter focuses on putting together XIB (pronounced “Nib”) files programmatically, as opposed to using Interface Builder. Again, this sounds like the long way around to me, but I followed along.
Using View Controllers in the sample HypnoTime App, we switch from a screen with some filler circles to a screen that tells us what time it is when we push a button. Of particular interest to me here is the method by which we added items to the UITabBar, the black bar at the bottom of some applications. For instance, in the iPod app, “Playlists”, “Artists”, “Albums”, etc. appear here.
Again, it seemed less than elegant and somewhat counter-intuitive for the simple act of adding icons to a portion of the screen.
I’m getting antsy to just start cobbling crap together and seeing what works and what doesn’t for my own ideas for iOS apps. That’s how I managed to learn HTML all those years ago in the late 90’s. Unfortunately, this environment doesn’t bode well for that. Because this is such a new platform, a whole lot hasn’t been written that you can easily turn up in a Google search. And because everything is protected by Apple’s NDA’s, Apple’s about the only place you can go to see sample code, which you can’t copy and paste per their Terms of Service. It’s not a friendly environment for just hacking crap together and futzing with it until it resembles something useful.
That’s probably a feature and not a bug, but it’s somewhat irritating to a tinkerer like me. Plus, this isn’t visual enough to support that kind of development. When you’re starting at a blank screen with only a couple resources at your disposal for looking at code, you can’t just start clicking buttons — you actually have to know what to type. It’d be like opening Word and being told, “Write a novel in Chinese”. Technically, you could, but the interface is of absolutely no use to you if you didn’t know Chinese.