I put a UIView on a storyboard with a view controller and made it the heir of the class I created. This class describes how to draw a table on a view. Here is the class description:
UIView.h
@interface View : UIView @property (strong, nonatomic) UITableView *contentTable; @end UIView.m
@implementation View - (void)drawRect:(CGRect)rect { self.contentTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width, rect.size.height) style:UITableViewStylePlain]; [self addSubview:self.contentTable]; } @end The table is displayed, but if you assign it a DataSource, it will not work. Code from the view controller:
UIViewController.m
@interface TRDetailTicketViewController () <UITableViewDataSource> @property (strong, nonatomic) IBOutlet View *mainView; @end - (void)viewDidLoad { [super viewDidLoad]; [self.mainView.contentTable setDataSource:self]; } No DataSource method is called (they are described below, did not include them here). You can do this through a method that will return a UITableView, but this is not what I need.