为什么我不能将子视图添加到表视图单元格的内容视图?表视图编程
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellTableIdentifier = @"CellTableIdentifier ";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: CellTableIdentifier];
if (cell == nil)
{
cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellTableIdentifier];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 5, 70, 15)];
[email protected]"Name:";
[cell.contentView addSubview:label];
}
return [cell autorelease];
}
因为有问题。 (提供详细信息,如果你想要好的答案。) – kennytm 2010-02-03 12:49:55
你当然可以!如果你在使用它的时候遇到了一些问题,那么在你看到它的时候真的不可能帮你。 – Vladimir 2010-02-03 12:50:40
好吧,他不能更新与更多的信息,如果你们关闭它:) – willcodejavaforfood 2010-02-03 12:53:44