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

232
Vistas
Cómo hacer un segue personalizado con datos IBInspectable

He usado IBInspectable en mi UIViewController personalizado y funciona, puedo modificar el valor en el generador de interfaz.

Sin embargo, cuando uso IBInspectable en mi UIStoryboardSegue personalizado, no funciona, no puedo ver las variables en el generador de interfaz.

¿Es imposible usar IBInspectable en un UIStoryboardSegue , o estoy haciendo algo mal?

Aquí está mi código.

 class EmbedSegue: UIStoryboardSegue { @IBInspectable var childLevel = 0 override func perform() { var container:ContainerVC? if childLevel == 0 { container = source as? ContainerVC } else if childLevel > 0 { var target:UIViewController? = source for _ in 0..<childLevel { target = target?.children.first if target == nil { break } } container = target as? ContainerVC } else if childLevel < 0 { var target:UIViewController? = source for _ in 0 ..< -childLevel { target = target?.parent if target == nil { break } } container = target as? ContainerVC } guard let _container = container else { var vcName = Utility.className(source) if let name = source.nibName { vcName = name } print("Unable to perform embed from \(vcName) with child level \(childLevel)") return } _container.embed(destination) } }
over 4 years ago · Santiago Trujillo
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