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

225
Views
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
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!