-
-
Save susieyy/c8d4f08aa270e5eb08c7400bd15298be to your computer and use it in GitHub Desktop.
#swtws
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
extension UIViewController { | |
func screenName() -> String { | |
let subjectType = Mirror(reflecting: self).subjectType | |
let className = "\(subjectType)" | |
let screenName = className.stringByReplacingOccurrencesOfString("ViewController", withString: "") | |
return screenName | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment