2016-11-27 43 views
0

在我的應用我設置了一個視圖與標籤/三種不同UITableViewControllers自定義UITableViewCells在兒童TableViewControllers

AllUsersTableViewController * child_1 = [[AllUsersTableViewController alloc] initWithStyle:UITableViewStylePlain]; 
NearMeTableViewController * child_2 = [[NearMeTableViewController alloc] init]; 
ByInterestTableViewController * child_3 = [[ByInterestTableViewController alloc] initWithStyle:UITableViewStylePlain]; 

然而之間揮筆,當我試圖鉤每個控制器的原型細胞中的故事板,我相信原型沒有註冊:

unable to dequeue a cell with identifier AllUserCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard 

即使我確實在故事板中分配了標識符。誰能幫我嗎?

+0

你可能已經忘記了設置一類爲小區。 – SJ3040

回答

0

就叫

[self.tableView registerClass:class forCellReuseIdentifier:@"identefier"] 
在viewDidLoad中

你的控制器的