标签:objective c ios 标准 宏 delegate
空
/**************************************************************/ // delegate 委托 /* #define DelegateSelf( __fun ) \ if (_delegate && [_delegate respondsToSelector:@selector( __fun )]) { \ [_delegate __x self];} */ #define DelegateSelf( __fun ) Delegate( __fun, self) /* #define Delegate( __x ) \ if (_delegate && [_delegate respondsToSelector:@selector(__x)]) { \ [_delegate __x];} */ #pragma mark - to delegate被注册KVO时,isa会变, 判断delegate被释放? #define Delegate( __fun, ...) \ if (_delegate && [_delegate respondsToSelector:@selector( __fun )]) { \ objc_msgSend(_delegate, @selector( __fun ), ## __VA_ARGS__);}
DelegateSelf(bankCellClickPlus:); Delegate(clickMedal:index:, self, sender.tag);
标签:objective c ios 标准 宏 delegate
原文地址:http://blog.csdn.net/uxyheaven/article/details/24671883