Xamarin / iOS [UITableViewController loadView] loaded the “Controller” nib but didn’t get a UITableView

Had this pop up this morning and had me scratching my head for a few minutes.  I’ve been working through the book “Mobile Development with C#” by Greg Shackles as I’m starting on some cross platform mobile app development and Xamarin looked to be the best approach. 
Anyway, Chapter 5 has you creating a little note app for 3 platforms – iOS, Android and WP.  Following the book my iOS app would compile but wouldn’t run, the error message was :

[UITableViewController loadView] loaded the "NoteListViewControler" nib but didn't get a UITableView

The resolution was easy enough, I deleted the class from the project and added a new “iOS Table View Controller” class rather than a class which I then set to inherit from a UITableViewController.    Doing it this way generates 3 files – “Cell”, “Controller” and “Source”.  I placed the relevant code in the “Controller” class and it worked.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s