Reputation: 1025
In Xcode 4, I create a subclass of UITableViewCell through the "New File..." menu. I checked the "targeted for iPad" and "With XIB for user interface" boxes. Then I immediately start getting build errors to this effect:
Automatic Reference Counting Issue - Receiver type 'UITableViewCell' for instance message does not declare a method with selector 'viewDidLoad'
I get 4 of these errors, one for each super method called.
Again this is a clean file created from the template with no extra changes. I haven't had problems with building any other classes that implement functions like viewDidLoad, etc. just UITableViewCell.
Upvotes: 2
Views: 168
Reputation: 22711
UITableViewCell
is a subclass of UIView
, not UIViewController
. The viewDidLoad:
method is defined in UIViewController
.
You might want to move your code into the initWithStyle:reuseIdentifier:
method instead.
Upvotes: 2