It's been a while since Clang added Objective-C literal syntax for NSDictionary
, NSArray
, NSNumber
, and BOOL
literals, like @[object1, object2,]
or @{key : value}
I'm looking for the selector name associated with the array literal, @[]
.
I tried to find out using the following code for NSArray
, but I didn't see a selector that seemed right.
unsigned int methodCount = 0;
Method * methods = class_copyMethodList([NSArray class], &methodCount);
NSMutableArray * nameOfSelector = [NSMutableArray new];
for (int i = 0 ; i < methodCount; i++) {
[nameOfSelector addObject:NSStringFromSelector(method_getName(methods[i]))];
}