objective c - Can I modify a variable via it's name as a string? -


this question has answer here:

is there way me modify variable string containing it's name?

something this:

int example = 1; nsstring *foo = @"example"; foo.value++ 

at point, example equal 2.

you can't local variables that. can instance variables using kvc.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -