Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective C Macro Library that Uses '$'

Recently, I came across a useful Objective C macro library on Github. The library cleverly used the '$' to denote its macros. For example, $dict(key1, obj1, key2, obj2) would return a NSDictionary with its respective keys and values.

Do you know the name of this library and its Github url?

like image 634
JP Richardson Avatar asked Dec 09 '22 04:12

JP Richardson


2 Answers

Found it: ConciseKit [https://github.com/petejkim/ConciseKit]

like image 145
JP Richardson Avatar answered Dec 17 '22 08:12

JP Richardson


I don't know which specific library you are discussing, but mine has some similar macros and I invite you to add more along these lines:

#define $array(objs...) [NSArray arrayWithObjects: objs, nil] 
#define $set(objs...) [NSSet setWithObjects: objs, nil] 
#define $format(format, objs...) [NSString stringWithFormat: format, objs]

It also defines $rect, $point, $size, etc.

https://github.com/peterdeweese/es_ios_utils/blob/master/es_ios_utils

like image 28
Peter DeWeese Avatar answered Dec 17 '22 08:12

Peter DeWeese