一. 純代碼創(chuàng)建Cell 注冊
[_tableViewregisterClass:[weiboCell class] forCellReuseIdentifier:identifier];
二. 使用nib文件加載的Cell 注冊
// 獲取UINib對象
UINib* nib = [UINib nibWithNibName:@"AppCell" bundle:nil];
// 取出cell對象Owner 多視圖控制器使用
AppCell *cell = [nib instantiateWithOwner:nil options:nil].lastObject;
// 使用nib對象注冊
[collectionView registerNib:nib forCellWithReuseIdentifier:identifier];
三箩溃、prototype cell注冊
1复局、Storyboard 中的UITableViewController必須關(guān)聯(lián)一個(gè)自定義UITableView
在自定義UITableView.m文件中實(shí)現(xiàn)數(shù)據(jù)源方法等映之。
2、UITableViewCell 必須關(guān)聯(lián)一個(gè)自定義UITableVieCell
在自定義UITableVieCell.m文件中怜奖,給子控件加載數(shù)據(jù)
3浑测、設(shè)置cell標(biāo)簽