Rom*_*zak 5 mobile objective-c storyboard uitableview ios
嗨,我在Storyboard 中的ControllerA中创建了UITableViewCell .我需要在不同的ControllerB中使用相同的UITableViewcell .我只需要用故事板来实现这个目标.知道我该怎么做?
你可以像下面这样使用它:-
在故事板中,您必须将另一个表单元格放入 ControllerB 笔尖中,并为其指定与自定义单元格类似的类名称,如下所示:-

和

你的 ControllerBcellForRowAtIndexPath看起来像这样
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
Members_Cell *cell = [tableView dequeueReusableCellWithIdentifier:@"Members_Cell"];
cell.lblMemberName.text=[ArrSearchResult objectAtIndex:indexPath.row];
return cell;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3234 次 |
| 最近记录: |