【发布时间】:2012-03-30 04:57:54
【问题描述】:
我想将 UIPickerView 添加到 UITableViewCell。现在我只是得到一个黑色的窗口。有人还可以向我解释将 UI 对象子类化到单元格的概念,即:我们何时将单元格作为委托和数据源委托?谢谢
编辑:这是我现在正在做的代码
case 1: {
cell = [tableView dequeueReusableCellWithIdentifier:@"groups"];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"groups"];
}
/*NSString *myGroupDetail = [_groupArray objectAtIndex:indexPath.row];
NSLog(@"the group detail label is %@",myGroupDetail);
cell.textLabel.text = myGroupDetail;
*/
[cell addSubview:_groupPicker];
break;
}
组是我想要选择器视图的部分,我从数组中获取该数据。
【问题讨论】:
标签: iphone xcode uitableview storyboard uipickerview