mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			45 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C
		
	
		
		
			
		
	
	
			45 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C
		
	
| 
											8 years ago
										 | //
 | ||
| 
											8 years ago
										 | //  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | ||
| 
											8 years ago
										 | //
 | ||
|  | 
 | ||
|  | NS_ASSUME_NONNULL_BEGIN | ||
|  | 
 | ||
| 
											7 years ago
										 | @class ConversationStyle; | ||
| 
											7 years ago
										 | 
 | ||
| 
											8 years ago
										 | @protocol ConversationViewLayoutItem <NSObject> | ||
|  | 
 | ||
| 
											7 years ago
										 | - (CGSize)cellSize; | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | - (CGFloat)vSpacingWithPreviousLayoutItem:(id<ConversationViewLayoutItem>)previousLayoutItem; | ||
| 
											7 years ago
										 | 
 | ||
| 
											8 years ago
										 | @end | ||
|  | 
 | ||
|  | #pragma mark -
 | ||
|  | 
 | ||
|  | @protocol ConversationViewLayoutDelegate <NSObject> | ||
|  | 
 | ||
|  | - (NSArray<id<ConversationViewLayoutItem>> *)layoutItems; | ||
|  | 
 | ||
| 
											8 years ago
										 | - (CGFloat)layoutHeaderHeight; | ||
|  | 
 | ||
| 
											8 years ago
										 | @end | ||
|  | 
 | ||
|  | #pragma mark -
 | ||
|  | 
 | ||
| 
											8 years ago
										 | // A new lean and efficient layout for conversation view designed to
 | ||
|  | // handle our edge cases (e.g. full-width unread indicators, etc.).
 | ||
| 
											8 years ago
										 | @interface ConversationViewLayout : UICollectionViewLayout | ||
|  | 
 | ||
|  | @property (nonatomic, weak) id<ConversationViewLayoutDelegate> delegate; | ||
| 
											8 years ago
										 | @property (nonatomic, readonly) BOOL hasLayout; | ||
| 
											8 years ago
										 | @property (nonatomic, readonly) BOOL hasEverHadLayout; | ||
| 
											7 years ago
										 | @property (nonatomic, readonly) ConversationStyle *conversationStyle; | ||
| 
											7 years ago
										 | 
 | ||
|  | - (instancetype)init NS_UNAVAILABLE; | ||
|  | 
 | ||
| 
											7 years ago
										 | - (instancetype)initWithConversationStyle:(ConversationStyle *)conversationStyle; | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 | @end | ||
|  | 
 | ||
|  | NS_ASSUME_NONNULL_END |