I'm working on my first iPhone app and have been able to get most things done. There's one problem that I've run into a few times and I want to understand the issue better.
In XCode, if I go File->New File->UIViewController subclass
and make sure that both UITableViewController subclass
and With XIB for user interface
are checked, then it creates a MyViewController.h
, MyViewController.m
, and MyViewController.xib
.
When I look at this xib in Interface Builder, you can see that the File Owner has an Outlet called view
that is already connected to the UITableView
. No problem. This all makes sense and is great.
My issue comes when I've changed the type of my class (or done something else) and some how the "view" Outlet goes away. I get an error saying "view not showing up in file owner outlet".
My question is how do I then reconnect the UITableView as the "view" of the ViewController when the Outlet goes away? The only way I've been able to get it to work is to literally start over with a new xib/viewcontroller.