Skip to content

Instantly share code, notes, and snippets.

@drodriguez
Created September 29, 2015 06:07
Show Gist options
  • Save drodriguez/ea5e3032ffc3bf4818f2 to your computer and use it in GitHub Desktop.
Save drodriguez/ea5e3032ffc3bf4818f2 to your computer and use it in GitHub Desktop.
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
@interface NewClass : NSObject
- (instancetype)initWithString:(NSString *)string NS_DESIGNATED_INITIALIZER;
@end
@interface NewClass (Unavailable)
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
#import "NewClass.h"
@implementation NewClass
- (instancetype)init {
__builtin_unreachable();
}
- (instancetype)initWithString:(NSString *)string {
if ((self = [super init])) {
}
return self;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment