JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MusicListCollectionLayout.h
Go to the documentation of this file.
1
5
6#import <UIKit/UIKit.h>
7
8NS_ASSUME_NONNULL_BEGIN
9
21@interface MusicListCollectionLayout : UICollectionViewFlowLayout
22
29@property(nonatomic) int columnType;
30
38- (int)getXSpace:(int)columnType;
39
47- (int)getYSpace:(int)columnType;
48
56- (int)getXMargin:(int)columnType;
57
64- (int)getYMargin:(int)columnType;
65
72- (NSInteger)count:(int)section;
73
81- (CGPoint)ignoreContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset;
82
87- (void)cancelIgnoreOffset;
88
94- (CGFloat)frameScale;
95
101- (instancetype)init;
102
107- (void)dealloc;
108
113- (void)prepareLayout;
114
121
128- (nullable NSArray<UICollectionViewLayoutAttributes *> *)layoutAttributesForElementsInRect:
129 (CGRect)rect;
130
137- (nullable UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:
138 (NSIndexPath *)indexPath;
139
146- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds;
147
154- (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset;
155
156@end
157
158NS_ASSUME_NONNULL_END
159
160// code: language=Objective-C
161// kate: hl Objective-C;
162// vim: set ft=objc :
The song-grid layout for the music-selection collection view.
Definition MusicListCollectionLayout.h:22
CGFloat frameScale()
Returns the cell scale factor for the current column type.
Definition MusicListCollectionLayout.mm:141
int columnType
The column-type selector: 0 is the three-column grid, 1 the four-column grid, and 2 the five-column g...
Definition MusicListCollectionLayout.h:29
void prepareLayout()
Lays the grid out, filling the cached attributes and the content width.
Definition MusicListCollectionLayout.mm:153
instancetype init()
Caches the device idiom and clears the paging state.
Definition MusicListCollectionLayout.mm:66
void cancelIgnoreOffset()
Clears the frozen-offset flag so paging resumes deferring to the superclass.
Definition MusicListCollectionLayout.mm:236
CGSize collectionViewContentSize()
The laid-out content size.
Definition MusicListCollectionLayout.mm:202
void dealloc()
Tears the layout down.
Definition MusicListCollectionLayout.mm:78