2010-04-01 9 views

Respuesta

32

En su -tableView:cellForRowAtIndexPath:, establezca la propiedad accessoryType de su UITableViewCell a UITableViewCellAccessoryNone, que es la predeterminada FYI.

+1

Fwiw, por defecto o no, yo tenía esta misma pregunta. Probablemente se está configurando en Interface/Storyboard Builder, y/o quizás (como en mi caso) necesito algunas celdas para indicar más detalles y otras no. ¡Gracias por la respuesta! – natevw

1

para C# usuario:

UITableViewCell cell = new UITableViewCell(); 

cell.Accessory = UITableViewCellAccessory.None; 
3
//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

El método accessoryTypeForRowWithIndexPath ** no está disponible en Swift ** – swiftBoy

12

Si está utilizando el constructor de interfaces simplemente seleccione su celular y establecer el accessory a none.

enter image description here

0

Para Swift

Agregar al siguiente final de su método cellForRowAtIndexPath justo antes return.

cell.accessoryType = UITableViewCellAccessoryType.None 

simplemente funciona perfecto !!

0

de Swift 3

cell.accessoryType = UITableViewCellAccessoryType.none 
Cuestiones relacionadas