Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有可能在objective-c的宏中定义数组。
是的,您可以在宏中定义数组。例如
#define MY_ARRAY [NSMutableArray arrayWithObjects:someObj1, someObj2, nil]
你也可以这样做:
#define MY_ARRAY @[ @"foo", @"bar" ]