oc經過代碼塊實現回調:

 1. 首先定義Singleton.h定義一個單利封裝宏 // .h #define single_interface(class) + (class *)shared##class; // .m // \ 表明下一行也屬於宏 // ## 是分隔符 #define single_implementation(class) \ static class *_instance; \ \ + (c
相關文章
相關標籤/搜索