forked from steipete/PSTCollectionView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPSTGridLayoutInfo.h
More file actions
43 lines (32 loc) · 1.17 KB
/
PSTGridLayoutInfo.h
File metadata and controls
43 lines (32 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// PSTCollectionLayoutInfo.h
// PSPDFKit
//
// Copyright (c) 2012 Peter Steinberger. All rights reserved.
//
#import <Foundation/Foundation.h>
@class PSTGridLayoutSection;
/*
Every PSTCollectionViewLayout has a PSTGridLayoutInfo attached.
Is used extensively in PSTCollectionViewFlowLayout.
*/
@interface PSTGridLayoutInfo : NSObject
@property (nonatomic, strong, readonly) NSArray *sections;
@property (nonatomic, strong) NSDictionary *rowAlignmentOptions;
@property (nonatomic, assign) BOOL usesFloatingHeaderFooter;
// Vertical/horizontal dimension (depending on horizontal)
// Used to create row objects
@property (nonatomic, assign) CGFloat dimension;
@property (nonatomic, assign) BOOL horizontal;
@property (nonatomic, assign) BOOL leftToRight;
@property (nonatomic, assign) CGSize contentSize;
// Frame for specific PSTGridLayoutItem.
- (CGRect)frameForItemAtIndexPath:(NSIndexPath *)indexPath;
// Add new section. Invalidates layout.
- (PSTGridLayoutSection *)addSection;
// forces the layout to recompute on next access
// TODO; what's the parameter for?
- (void)invalidate:(BOOL)arg;
// Make a copy of the current state.
- (PSTGridLayoutInfo *)snapshot;
@end