From df0e538119b76c5d4e951a0678425d26bd161987 Mon Sep 17 00:00:00 2001 From: James Sherlock Date: Mon, 17 Apr 2017 14:51:20 -0700 Subject: [PATCH] Added NS_UNAVAILABLE to new/init Summary: Not sure what was expected for a "designated initialiser" feel free to school me and I'll do it! (Also just had to google difference between + and - in ObjC) Issue fixed: #654, #652 Closes https://github.com/Instagram/IGListKit/pull/662 Differential Revision: D4900092 Pulled By: jessesquires fbshipit-source-id: 7858065ecc88a9ad7cb064811f0180d0f84f174d --- Source/Internal/IGListAdapterProxy.h | 12 +++++++++++- Source/Internal/IGListSectionMap.h | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Source/Internal/IGListAdapterProxy.h b/Source/Internal/IGListAdapterProxy.h index b1af43be..f74cb128 100644 --- a/Source/Internal/IGListAdapterProxy.h +++ b/Source/Internal/IGListAdapterProxy.h @@ -33,7 +33,17 @@ IGLK_SUBCLASSING_RESTRICTED */ - (instancetype)initWithCollectionViewTarget:(nullable id)collectionViewTarget scrollViewTarget:(nullable id)scrollViewTarget - interceptor:(IGListAdapter *)interceptor; + interceptor:(IGListAdapter *)interceptor NS_DESIGNATED_INITIALIZER; + +/** + :nodoc: + */ +- (instancetype)init NS_UNAVAILABLE; + +/** + :nodoc: + */ ++ (instancetype)new NS_UNAVAILABLE; @end diff --git a/Source/Internal/IGListSectionMap.h b/Source/Internal/IGListSectionMap.h index bc5b5aaa..c5a3ab2c 100644 --- a/Source/Internal/IGListSectionMap.h +++ b/Source/Internal/IGListSectionMap.h @@ -107,6 +107,11 @@ IGLK_SUBCLASSING_RESTRICTED */ - (instancetype)init NS_UNAVAILABLE; +/** + :nodoc: + */ ++ (instancetype)new NS_UNAVAILABLE; + @end NS_ASSUME_NONNULL_END