Search code examples
iosswiftuitableviewsegueswift4

Trigger Segue from a table cell into another page


I'm trying to created a segue from my table cell to go into a next page.

I did

enter image description here

enter image description here

SettingsTableViewController

import UIKit

class SettingsTableViewController: UITableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationItem.title = "Settings"
        self.tabBarItem.title = "Settings"

    }

}

GeneralTableViewController

import UIKit

class GeneralTableViewController: UITableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationItem.title = "General"
        self.tabBarItem.title = "General"

    }

}

Result

enter image description here

The segue transition seems to work, I see empty screen in there.

Any hints for me ?


Solution

  • If you want to show it as it's , then you have to make static cells , instead of dynamic prototypes , so select the table and from attributes inspector select static cells , but you still have to implement the delegate like didSelectRowAt

    enter image description here