Automatically Loading XIB for UITableViewController

Posted by ACBurk on Stack Overflow See other posts from Stack Overflow or by ACBurk
Published on 2010-04-07T22:21:08Z Indexed on 2010/04/07 22:23 UTC
Read the original article Hit count: 347

Ran into something interesting, want to know if I'm doing something wrong or if this is the correct behavior.

I have a custom UITableViewController. I ASSUMED (first mistake) that if you initialize as such:

[[CustomTableController alloc] init];

it would automatically load from a XIB of the same name, CustomTableController.xib, if it is in the same directory and such.

HOWEVER

This does not work; doesn't load the XIB. BUT, if I change the parent class of my controller from 'UITableViewController' to 'UIViewController', EVERYHTING WORKS FINE!

Calling:

[[CustomTableController alloc] init];

loads the controller and view from my xib.

Am I doing something wrong? Is this a bug? Expected behavior?

© Stack Overflow or respective owner

Related posts about uitableviewcontroller

Related posts about iphone