Can I do NSVariableFromString like NSClassFromString and NSSelectorFromString?

前端 未结 3 698
死守一世寂寞
死守一世寂寞 2021-01-16 12:25

Right so I have noticed that you can do NSClassFromString and NSSelectorFromString.

Is it possible to do something like NSVariableFromString?

3条回答
  •  爱一瞬间的悲伤
    2021-01-16 13:26

    You can get values from strings using NSScanner but, as JemeryP notes, at runtime variable names have generally been converted to pointers and memory addresses.

提交回复
热议问题