I have a custom UITableViewController ("ChatView") that has an Output for a tableView. In the interface builder I have connected the tableView in the nib to the outlet. When the view loads I get the above error. The view is loaded via a tabcontroller.
I have done some research about the error and I can't seem to track down the issue. I would appreciate if someone could get me going in the right direction to resolve this.
@interface ChatViewController : UITableViewController
<UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *chatMessages;
IBOutlet UITableView *chatTable;
IBOutlet UITextField *chatText;
}
@property(nonatomic, retain) IBOutlet UITextField *chatText;
@property (nonatomic, retain) IBOutlet UITableView *chatTable;
@property (nonatomic, retain) NSMutableArray *chatMessages;
-(IBAction)sendPressed;
@end
Thanks
Had a similar problem. The runtime dump was saying:
loaded nib but didn't get a UITableView
I had hooked up everything fine on the storyboard. I had a viewController as the main class and had a UITableView object with a custom cell inside.
However, the problem was that my custom class had 'somehow' ended up being a UITableView instead of this:
@interface iPadDetailViewController : UIViewController <UITableViewDelegate> {
IBOutlet UITableView *tableBox;
}
Once I managed to match up the storyboard type with the custom class type it was all fine.
The moral of the story, xCode and the compiler is usually right. Check your classes match.
If your class is a UITableViewController
then the view
outlet must be connected to the table view. If you want a view that contains a UITableView
then simple make the controller a UIViewController
which conforms to the UITableViewDelegate
and UITableViewDataSource
protocols and this will go away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With