mardi 30 décembre 2014

how to create a instance of objective-c class by name?

I want get somethine like:



#define weaken(object) ...

----

ClassABCD * abcd = [ClassABCD new];
weaken(abcd);
weakAbcd.tag = 0;

----


i have some code below:



#define weaken(x) __weak typeof(x) weak##x = x


but it only can use like "weakabcd" . not "weakAbcd"...




Aucun commentaire:

Enregistrer un commentaire