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

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -