1. Screen width screen height
#define Screen_width [UIScreen mainscreen].bounds.size.width
#define Screenh_height [UIScreen mainscreen].bounds.size.height
2. Get random Colors
#define Rrrandomcolor [Uicolor colorwithred:arc4random_uniform (/255.0 green:arc4random_uniform)/255.0 Blue: Arc4random_uniform (/255.0 alpha:1.0]
3. Color
#define Rrcolor (R, G, b) [Uicolor colorwithred: (r)/255.0 Green: (g)/255.0 Blue: (b)/255.0 alpha:1.0]
#define Rralphacolor (R, G, B, a) [Uicolor colorwithred: (r)/255.0 Green: (r)/255.0 Blue: (R)/255.0 Alpha:a]
#define Rrclearcolor [Uicolor Clearcolor]
4.Log
Rrlog (...) NSLog (@ "%s line%d \%@\n\n", __func__,__line__,[nsstring stringwithformat:__va_args__])
5. Empty sentences
is empty or [NSNull null]
#define NOTNILANDNULL (_ref) (((_ref)! = nil) && (![ (_REF) isequal:[nsnull Null]]))
#define ISNILORNULL (_ref) (((_ref) = nil) | | ([(_REF) isequal:[nsnull Null]]))
Whether the string is empty
#define ISSTREMPTY (_ref) (((_ref) = nil) | | ([(_REF) isequal:[nsnull null]]) | | ([(_ref) isequaltostring:@ ""]) | | ([(_ref) isequaltostring:@ "(null)"]))
Whether the array is empty
#define ISARREMPTY (_ref) (((_ref) = nil) | | ([(_REF) isequal:[nsnull null]]) | | ([(_REF) count] = = 0))
#define ISNUMBEREMPTY (_ref) ((_ref) = nil) | | ((_ref). Floatvalue = = 0)
Your favorite macros (encountered add)