Skip to content

Instantly share code, notes, and snippets.

@yuuki1224
Created November 10, 2014 15:12
Show Gist options
  • Save yuuki1224/a4d42a7477877de9da22 to your computer and use it in GitHub Desktop.
Save yuuki1224/a4d42a7477877de9da22 to your computer and use it in GitHub Desktop.
AbstractClass.m
#import <Foundation/Foundation.h>
@interface AbstractClass : NSObject
- (instancetype)init __attribute__((unavailable("AbstractClass cannot be created directly")));
+ (instancetype)new __attribute__((unavailable("AbstractClass cannot be created directly")));
@end
@implementation AbstractClass
- (instancetype)initPrivate
{
self = [super init];
return self;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment