Skip to content

Instantly share code, notes, and snippets.

@protocol UIViewControllerInitializerUnavailable <NSObjectInitializerUnavailable>
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
@end
@interface SomeManager : NSObject <NSObjectInitializerUnavailable>
- (instancetype)initWithSomeService:(id<SomeService>)someService;
@end
@interface NewsViewController : UIViewController <UIViewControllerInitializerUnavailable>
- (instancetype)initWithViewModel:(id<NewsViewControllerModel>)viewModel;
@end
@kollapze
kollapze / NSObjectInitializerUnavailable.h
Last active March 18, 2018 18:09
Default Initializers
@protocol NSObjectInitializerUnavailable <NSObject>
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end