Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Remove initializers from the NICollectionViewModeling protocol. (#707)
Browse files Browse the repository at this point in the history
The initializers are not really required on the NICollectionViewModeling
protocol. Instead of requiring all clients of the NICollectionViewModeling
protocol to implement them, let's remove them.

NOTE: This has no change to the concrete implementations of the model
classes, it just updates the protocols required for other alternative
model objects.
  • Loading branch information
mrhappyasthma authored and stephanemoore committed Jul 13, 2019
1 parent b1e56f0 commit 9d5c247
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/collections/src/NICollectionViewModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
*/
@protocol NICollectionViewModeling <NIActionsDataSource, UICollectionViewDataSource, UICollectionViewDataSourcePrefetching>

#pragma mark Creating Collection View Models

// Designated initializer.
- (id)initWithDelegate:(id<NICollectionViewModelDelegate>)delegate;
- (id)initWithListArray:(NSArray *)listArray delegate:(id<NICollectionViewModelDelegate>)delegate;
// Each NSString in the array starts a new section. Any other object is a new row (with exception of certain model-specific objects).
- (id)initWithSectionedArray:(NSArray *)sectionedArray delegate:(id<NICollectionViewModelDelegate>)delegate;

#pragma mark Accessing Objects

- (NSIndexPath *)indexPathForObject:(id)object;
Expand All @@ -77,6 +69,11 @@

- (id)initWithDelegate:(id<NICollectionViewModelDelegate>)delegate NS_DESIGNATED_INITIALIZER;

- (id)initWithListArray:(NSArray *)listArray delegate:(id<NICollectionViewModelDelegate>)delegate;

// Each NSString in the array starts a new section. Any other object is a new row (with exception of certain model-specific objects).
- (id)initWithSectionedArray:(NSArray *)sectionedArray delegate:(id<NICollectionViewModelDelegate>)delegate;

// Redeclaring for property autosynthesis.
@property (nonatomic, weak) id<NICollectionViewModelDelegate> delegate;

Expand Down

0 comments on commit 9d5c247

Please sign in to comment.