Created
August 7, 2025 11:43
-
-
Save berikv/71e890cb561efebe2960a2e3ffba9bd1 to your computer and use it in GitHub Desktop.
List the runtime (hidden) methods of an objc object
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
| let clazz: AnyClass = UIDocumentInteractionController.self // <- Replace the class name with the class you want to get the methods of | |
| var count: UInt32 = 0 | |
| if let methods = class_copyMethodList(clazz, &count) { | |
| for i in 0..<Int(count) { | |
| let sel = method_getName(methods[i]) | |
| print(NSStringFromSelector(sel)) | |
| } | |
| free(methods) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment