access objective-c object by string name or variable

前端 未结 3 1118
北荒
北荒 2020-12-12 03:08

i have been looking around and haven\'t quite found anything on doing this and am not sure if its even possible, but this is what i am trying to achieve. please note, i am g

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 03:49

    I think you need to store the labels in an NSArray, then you could access the labels by index.

    Another approach is getting the labels using KVC.

提交回复
热议问题