代码之家  ›  专栏  ›  技术社区  ›  Nithin

向不带自定义单元格的uitableview显示detaildisclosure按钮

  •  1
  • Nithin  · 技术社区  · 15 年前

    如何在不使用自定义单元格的情况下向uitableview显示详细信息披露按钮。我知道它使用accessorytype:方法,但不知道如何实现它..请帮助..

    2 回复  |  直到 15 年前
        1
  •  15
  •   Manjunath    15 年前

    //自定义表视图单元格的外观。

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
    {
    
        static NSString *CellIdentifier = @"Cell";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil)
        {
            cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
        }
        [cell setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton];
        return cell;
    }
    

    [单元格集合访问类型:uiTableViewCellAccessoryDetailDisclosureButton];

        2
  •  2
  •   gerry3    15 年前
    cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;