Is there a way to get a Swift type name as a string with its namespace (or frame name)?
For example, if Foo.framework has a class called Bar , I would like to get a string like "Foo.Bar" .
After that, just return the class name "Bar" .
let barName1 = String(Bar.self) // returns "Bar" let barName2 = "\(Bar.self)" // returns "Bar" let barName3 = "\(Bar().dynamicType)" // returns "Bar"
I would also like to get the frame name "Foo" as a namespace.
ios swift
Yoichi tagaya
source share