如何删除UITableView中的箭头

我正在研究一个UITableView 。 请告诉我如何删除显示在每一行的箭头button?

在你的-tableView:cellForRowAtIndexPath: ,将你的UITableViewCell的accessoryType属性设置为UITableViewCellAccessoryNone, 这是默认的FYI

如果您正在使用界面生成器,请select您的单元格,然后将accessory设置为“ none

在这里输入图像说明

 //Write following code into your program -(UITableViewCellAccessoryType)tableView:(UITableView *)tv accessoryTypeForRowWithIndexPath (NSIndexPath *)indexPath { return UITableViewCellAccessoryNone; } //Create a table for different section of app -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { cell.accessoryType = UITableViewCellAccessoryNone; } 

// VKJ

对于Swift

return之前将下面的内容添加到cellForRowAtIndexPath方法的末尾。

  cell.accessoryType = UITableViewCellAccessoryType.None 

它只是完美的作品!

对于c#用户:

 UITableViewCell cell = new UITableViewCell(); cell.Accessory = UITableViewCellAccessory.None; 

为Swift 3

 cell.accessoryType = UITableViewCellAccessoryType.none