samedi 23 mai 2015

Swift: How to get array element type having available array MirrorType

Lets assume I have a MirrorType of an Array.

I need to get the type of element in this array and then create a new element of this type.

e.g.

var elementType : Any.Type = some_magic_function(arrayMirrorType)
var arrayElement = some_magic_element_constructor(elementType)





Aucun commentaire:

Enregistrer un commentaire