How to remove arrow in UITableView

后端 未结 6 534
终归单人心
终归单人心 2020-12-31 02:35

I am working on a UITableView. Please tell me how to remove the arrow button displayed in the each and every row?

相关标签:
6条回答
  • 2020-12-31 02:58
    //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

    0 讨论(0)
  • 2020-12-31 03:00

    If you are using the interface builder just select your cell and set the accessory to none.

    enter image description here

    0 讨论(0)
  • 2020-12-31 03:10

    for Swift 3

    cell.accessoryType = UITableViewCellAccessoryType.none
    
    0 讨论(0)
  • 2020-12-31 03:11

    In your -tableView:cellForRowAtIndexPath:, set the accessoryType property of your UITableViewCell to UITableViewCellAccessoryNone, which is the default FYI.

    0 讨论(0)
  • 2020-12-31 03:20

    For Swift

    Add following to end of your cellForRowAtIndexPath method just before return.

        cell.accessoryType = UITableViewCellAccessoryType.None
    

    it just works perfect!!

    0 讨论(0)
  • 2020-12-31 03:23

    For c# user :

    UITableViewCell cell = new UITableViewCell(); 
    
    cell.Accessory = UITableViewCellAccessory.None;
    
    0 讨论(0)
提交回复
热议问题