Created
December 5, 2017 19:37
-
-
Save fellipecaetano/abf5abc38ed3e290a795ce43165076c8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@objc protocol Migration {} | |
func printMigrations() { | |
var classCount: UInt32 = 0 | |
let classList = objc_copyClassList(&classCount)! | |
for index in 0 ..< Int(classCount) { | |
if class_conformsToProtocol(classList[index], Migration.self) { | |
print(classList[index]) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment