Search code examples
iosuitableviewstoryboarduistoryboardsegue

How to segue from UITableView header?


I need to push another UIViewController when click the UITableView header, I try to do it in the storyboard but I can't Ctrl drag from the UITableView header ?

Is it possible to segue from UITableView header ?


Solution

  • Drag a UIButton to the top of the TableView to set it as the header and then control drag from the button to make your segue.

    EDIT: You can drag any type of view to the header that has some sort of onTouchDown outlet but I figured a button would be the simplest for demonstration purposes.