TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Sep 2015 |
Maintained by Zhn.
Singleton with one line implementation.
platform :ios, '7.0'
pod "ZHNBaseSingleton"
.h file:
@interface ChildSingleton : ZHNBaseSingleton
@end
.m file:
@implementation ChildSingleton
+ (instancetype)shared
{
return [ChildSingleton sharedByClass:[ChildSingleton class]];
}
@end
NSLog(@"%@", [ChildSingleton shared]);
[[ChildSingleton shared] destroy];