mirror of
https://github.com/Instagram/IGListKit
synced 2026-04-25 15:37:38 +00:00
Summary: Couple best practices I want to make sure our examples reflect: - Multiple cells in a section controller - Unique models returned in `objectsForListAdapter:` (no dupes!) - Dynamic item count (`comments` array) Issue fixed: #595 - [x] All tests pass. Demo project builds and runs. Closes https://github.com/Instagram/IGListKit/pull/615 Differential Revision: D4852192 Pulled By: jessesquires fbshipit-source-id: f4a89800f90e6b5ea4b6dd7c0d9a78ca5d65082c
30 lines
1.1 KiB
Objective-C
30 lines
1.1 KiB
Objective-C
/**
|
|
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
|
|
|
|
The examples provided by Facebook are for non-commercial testing and evaluation
|
|
purposes only. Facebook reserves all rights not expressly granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <IGListKit/IGListDiffable.h>
|
|
|
|
@interface Post : NSObject <IGListDiffable>
|
|
|
|
@property (nonatomic, strong, readonly) NSString *username;
|
|
@property (nonatomic, strong, readonly) NSArray<NSString *> *comments;
|
|
|
|
- (instancetype)initWithUsername:(NSString *)username
|
|
comments:(NSArray<NSString *> *)comments NS_DESIGNATED_INITIALIZER;
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
+ (instancetype)new NS_UNAVAILABLE;
|
|
|
|
@end
|