测试已测试 | ✓ |
Lang语言 | Obj-CObjective C |
许可证 | MIT |
发布最新版本 | 2017年1月 |
由GyazSquare,Goichi Hirakawa维护。
GSSynthesizeSingleton是一个简单的宏,用于生成Objective-C单例类的成员函数。
检出源代码
$ git clone https://github.com/GyazSquare/GSSynthesizeSingleton.git
将GSSynthesizeSingleton.h复制到您的项目中。
MyManager.h
@import Foundation;
@interface MyManager : NSObject
+ (instancetype)sharedManager;
@end
MyManager.m
#import "GSManager.h"
#import "GSSynthesizeSingleton.h"
@implementation MyManager
GSSynthesizeSingleton(My, Manager);
@end
GSSynthesizeSingleton遵循MIT许可证。
有关更多信息,请参阅LICENSE文件。