Monday, 2 November 2009

MonoTouch UINavigationController Placemat

In one of my other posts I included a 'placemat' diagram to help make sense of the code.

Someone commented that they found the presentation useful, so as a quick post today I decided to placemat the Roget's 1911 Thesaurus sample.

Rogets 1911 Placemat

Note that I'm not suggesting this is the neatest, tidiest, best-practice way to structure a MonoTouch application (I'm learning along with everyone else). This is purely to help you find your way around the example code.

For example... on thing I learned is that I didn't really need to pass an instance of the 'root' MainViewController around - each UIViewController has a NavigationController property referencing the UINavigationController that 'contains' it. Therefore any given UIViewController that has been added to a UINavigationController can call this.PushViewController (or else pass a reference to this into the UITableViewDelegate constructor to use in RowSelected.

1 comment:

  1. Just started playing around with Monotouch and wrangling the Cocoa fx. This couldn't have been more helpful. Great way to visualize the screens, the code and the class relationships. Thanks.