ios - Loop through all 'instance' and 'class' methods of a subclass, at runtime -


this lists methods in nsobject. i'm struggling understand why doing because expecting methods of 'tutorialerrormanager' instead.

class currentclass = [tutorialerrormanager class];     while (currentclass) {         // iterate on instance methods class         unsigned int methodcount;         method *methodlist = class_copymethodlist(currentclass, &methodcount);         unsigned int = 0;         (; < methodcount; i++) {             nslog(@"%@ - %@", [nsstring stringwithcstring:class_getname(currentclass) encoding:nsutf8stringencoding], [nsstring stringwithcstring:sel_getname(method_getname(methodlist[i])) encoding:nsutf8stringencoding]);         }          free(methodlist);         currentclass = class_getsuperclass(currentclass);     } 


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -