Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda