Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
How to perform an unwind segue from a custom tableview cell?

I'm trying to trigger a unwind segue from a button that is inside a custom table view cell. But it won't let me create the link between the exit and the view controller.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This sounds like a good job for a protocol/delegate pattern. What I would do is:

  1. Create your unwind segue by connecting it to the viewcontroller not to the tableViewCell. Assign it an identifier you can use later

  2. Create a protocol to which the MyViewController will conform

     protocol unwindHandler{
        func didRequestUnwind()
     }
    
  3. Implement the protocol in the MyViewController

     extension MyViewController : unwindHandler{
         func didRequestUnwind(){
    
             performSegue(withIdentifier:"myUnwind",sender:nil)//execute the segue with identifier assigned in 0
         }
     }
    
  4. Assign the ViewController as the delegate to the tableViewCell in cellForRowAt in the datasource of the tableView

  5. Call delegate?.didRequestUnwind() in the didSelectRowAtIndexPath for the cell(s) you want to have that capability

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!