p0ny
p0ny

Reputation: 315

Remove the UItableview cell segue button?

I was just wondering if it was possible to remove the button that is automatically added to the UItableview cell when creating a segue in storyboard between the cell background and the destination view. For my app, it takes up to much space. I'd rather the user just tap any where on the cell to activate the segue.

Does anyone know how to do this? When I select the button in the cell and hit delete, the whole cell deletes.

Upvotes: 0

Views: 273

Answers (2)

p0ny
p0ny

Reputation: 315

eddwinpaz answer is what worked for me (as I was using storyboard and not doing it with code)

"Select on storyboard Atributes inspector and select the tablecell you don't want it to appear the Accesory and then select Accessory: none"

Upvotes: 1

iDec
iDec

Reputation: 727

Try adding the following code to your cellForRowAtIndexPath method:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
              cell.accessoryType = UITableViewCellAccessoryNone;
    }

Upvotes: 2

Related Questions