How to store enum values in a NSMutableArray

前端 未结 6 1195
故里飘歌
故里飘歌 2021-02-06 22:58

My problem is since an enum in objective-c essentially is an int value, I am not able to store it in a NSMutableArray. Apparently NSMutableArray won\'t

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-06 23:33

    Macatomy's answer is correct. But instead of NSNumber I would suggest you use NSValue. That is its purpose in life.

提交回复
热议问题