mercredi 14 juin 2017

How to implement Mirror on final class inside pod?

I'm trying to implement Mirror on final class "DeckTransition pod" to change some var, but the mirror didn't reflect anything to me,

let aMirror = Mirror(reflecting: "DeckPresentationController")
    print("the children of this ref \(aMirror.children.first) , and the count is  \(aMirror.children.count) "

# the children of this ref nil , and the count is  0
I tried both without quotation and without parentheses, both error "unresolved identifier" 
# let aMirror = Mirror(reflecting: DeckPresentationController())
# let aMirror = Mirror(reflecting: DeckPresentationController)

Any ideas to did it ?





Aucun commentaire:

Enregistrer un commentaire