Is there any possibility to define arrays in macro in objective-c.
Yes, you can define arrays in macros. e.g
#define MY_ARRAY [NSMutableArray arrayWithObjects:someObj1, someObj2, nil]
You can also just do:
#define MY_ARRAY @[ @"foo", @"bar" ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With