SDWebImage

2020-05-22  本文已影响0人  Silence_xl
image.png

SDWebImage这个宏很惊艳

#ifndef dispatch_main_async_safe
#define dispatch_main_async_safe(block)\
    if (dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL) == dispatch_queue_get_label(dispatch_get_main_queue())) {\
        block();\
    } else {\
        dispatch_async(dispatch_get_main_queue(), block);\
    }
#endif
image.png
上一篇下一篇

猜你喜欢

热点阅读