iphone - Dynamically Load Classes in Objective-C? -
is there way #import class string in objective-c @ run time? methods produce similar result welcome.
edit:
i want access class name determine @ runtime. this:
nsstring *classname = getclassname(); class myclass = loadclass(classname); myclass *myvar = [[myclass alloc] init];
is there way without putting static #import directive myclass @ top of file?
the #import
directive not "import" class — inserts text named file current file. isn't useful @ runtime after source has been compiled.
what want create bundle classes , dynamically load bundle. in order able talk classes core program, you'll want have common protocol bundled classes implement.
Comments
Post a Comment