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
Post a Comment