iphone - How to Call an Instance Method From a Variable Name -
possible duplicate:
object name of string
i want call code below, able change "iteminstance" stringe variable. possible?
uiimage *image = [iteminstance getimage:itemnumber]; edit: read nsselectorfromstring method appears need use, have no idea how it's supposed implemented. ideas?
not exactly. simplest way effect build nsdictionary strings keys , matching instances values. becomes like:
uiimage *image = [[dict objectforkey:instancename] getimage:itemnumber];
Comments
Post a Comment