Best way to enum NSString

前端 未结 7 693
广开言路
广开言路 2021-02-02 13:23

Im digging for ways to enum objc object such as NSString, I remember there a new feature in a version of Xcode4+ which offering a new way to enum , but not clearly. Anyone know

7条回答
  •  伪装坚强ぢ
    2021-02-02 13:44

    I think you are looking for the inline array function. eg

    @[@"stringone",@"stringtwo",@"stringthree"];
    

    if not, i'm not sure you can enum objects.

    you could however have a static array of strings and have the enum reference object at index.

提交回复
热议问题