Created
June 7, 2014 00:43
-
-
Save MartinJNash/e2bb27937711f350aa44 to your computer and use it in GitHub Desktop.
Class name to string in Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
class func classString() -> String { | |
return NSStringFromClass(self) | |
} | |
} | |
Person.classString() // "_TtC11lldb_expr_06Person" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice.