IOS Programming Update

March 12, 2012

I am starting to feel better with iOS user interface programming. I know now what a view controller is actually doing, how to wire up a navigation controller that works, and how to create a table with its data source and custom cells.

I even don't feel so bad when I use XCode.

The user interface API of iOS is primarily callback-driven. That's why there is –  for each class –  an appropriate delegate class and for data controls a data source class. It's just another mechanism for delivering events to the application.

But iOS feels like a bitch API. If you forget to wire up something or just leave some values to the defaults, it often crashes or nothing appears at all. Moreover, user interface views or controllers often work only the one intended way and collaborate only with specific peers.

This “picky behavior” is very unexpected to me and requires a lot of experimentation. One way  to get along is to stay on the conservative side and do only as the documentation and example code says. This is limiting and boring!

But I do apps and not art.