Skip to content

Instantly share code, notes, and snippets.

@alexkent
Created November 5, 2015 16:22

Revisions

  1. alexkent created this gist Nov 5, 2015.
    7 changes: 7 additions & 0 deletions swift typename without module
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    extension NSObject {
    func typeNameWithOutModuleName() -> String {
    var typeNameHeirarchy = NSStringFromClass(self.dynamicType).componentsSeparatedByString(".")
    typeNameHeirarchy.removeFirst()
    return typeNameHeirarchy.joinWithSeparator(".")
    }
    }