
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface MySingleton : NSObject | |
// ... | |
+ (instancetype) sharedInstance; | |
+ (instancetype) alloc __attribute__((unavailable("alloc not available, call sharedInstance instead"))); | |
- (instancetype) init __attribute__((unavailable("init not available, call sharedInstance instead"))); | |
+ (instancetype) new __attribute__((unavailable("new not available, call sharedInstance instead"))); |