Skip to content

Instantly share code, notes, and snippets.

View tokijh's full-sized avatar
🎯
Focusing

Yoon Joonghyun tokijh

🎯
Focusing
View GitHub Profile
@tokijh
tokijh / PrintMethodPropertyIvar.m
Created June 3, 2021 19:25 — forked from Koze/PrintMethodPropertyIvar.m
Print Method List, Property List, and Ivar List
#import <objc/runtime.h>
void PrintMethodList(Class cls) {
printf("// Method List of %s\n", class_getName(cls));
unsigned int outCount;
Method *methodList = class_copyMethodList(cls, &outCount);
for (unsigned int i=0; i<outCount; i++) {
Method m = methodList[i];
SEL sel = method_getName(m);
printf("%s\n", sel_getName(sel));