3

Lately, when I try to add a seque to my UITableView cell using the storyboard:

Adding a seque

Xcode is auto-adding an info icon / "Accessory Button" to the cell:

Info icon

I know I can remove it like so:

Remove Accessory

However, there appear to be other issues that might also be symptoms of whatever is causing this behavior, but that's a separate question... My question here is why is Xcode adding it in the first place? It's never done this before when I've added storyboard seques...

Community
  • 1
  • 1
Troy
  • 21,172
  • 20
  • 74
  • 103

3 Answers3

5

During creation of the segue you have selected "Accessory Action" in the segue action popover. If you do this Xcode will set the accessory to "Detail Disclosure", because you need a tappable accessory to have an accessory action.

Select a Segue in the upper part of the popover. Those are Selection Segues, which are triggered when you select the cell.

enter image description here


This does explain your other issue as well. Because your segue is connected to the accessory, which you remove. So there is no way to actually trigger your segue.

Matthias Bauch
  • 89,811
  • 20
  • 225
  • 247
1
Select the cell and go to the attributes inspector
Scroll down to Accessory
In the drop down menu you will be having etail Disclosure selected
Change it to Disclosure Indicator
0

There are two different behaviors for the segues. You can see them on your inspector: triggered segues.

  • If you choose the accessory action, Xcode automatically add an accessory button (the circle).
  • If you choose the selection action, you have no accessory button.
Vincent Dondain
  • 430
  • 3
  • 10