objective c - Getting class from string in swift -


i have created custom class named predicatecontroller.

i need pass class of predicatecontroller called framework written in objc. however, whenever using properties of swift, same returning me <projectname>.predicatecontroller.

i need class name predicatecontroller.

is there workaround in swift same.

thanks.

you can type of class using self on class , wrap string, e.g. ...

let date = nsdate(); let clazz = nsdate.self let str = "\(date) of type \(clazz)" println(str) 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -