I have 2 classes that inherit UITableViewControllers. And this two table views should use the same custom UITableViewCell. So how can I use a Custom UITableViewCell from a Nib File in two different classes ? The owner of the xib can be only 1 class.
@interface Class1 : UITableViewController<UITableViewDataSource,
UITableViewDelegate> {
UITableViewCell *myCustomTableRow;
}
@property (nonatomic, retain) IBOutlet UITableViewCell *myCustomTableRow;
@interface Class2 : UITableViewController<UITableViewDataSource,
UITableViewDelegate> {
UITableViewCell *myCustomTableRow;
}
@property (nonatomic, retain) IBOutlet UITableViewCell *myCustomTableRow;
Create a
UITableViewControllersub-class sayCommonTableView. Make this as the owner of nib file. Then inherit the two classes you want to implement fromCommonTableViewClass. This will work fine.