Tim
Tim

Reputation: 175

Tableview - Disclosure Indicator

I've set the cell accessory to "disclosure indicator" and I have linked that cell with an ctrl - click ("show (eg. push)") to another view. But when I test the app, the cell just becomes grey and nothing more (look at the screenshot). I want this to behave like a Settings-like view.

any hints?

thx, Tim

screenshot

enter image description here

Upvotes: 0

Views: 1945

Answers (2)

Sarath
Sarath

Reputation: 339

if you want to navigate by code means try this method.

func tableView(_ tableView: UITableView, accessoryButtonTappedForRowWith indexPath: IndexPath) {
    //navigateTo your viewController        
}

You can find this in TableView Delegate.

Upvotes: 0

rdelmar
rdelmar

Reputation: 104082

The disclosure indicatoris just that; an indicator, not a button, so when you make a segue from a cell , with or without a disclosure indicator, it needs to be a "selection" segue. The "accessory action" section of the choices you get when making the segue should be use if you have a "detail disclosure" button, and you want the segue triggered by touching the button itself.

Upvotes: 3

Related Questions