|
JubeatPlus 3.9.11
|
The song-grid layout for the music-selection collection view. More...
#include <MusicListCollectionLayout.h>


Instance Methods | |
| (int) | - getXSpace: |
| Returns the horizontal spacing between adjacent cells for the given column type on the current device idiom. | |
| (int) | - getYSpace: |
| Returns the vertical spacing between adjacent cell rows for the given column type on the current device idiom. | |
| (int) | - getXMargin: |
| Returns the leading horizontal margin for the given column type on the current device idiom. | |
| (int) | - getYMargin: |
| Returns the leading vertical margin for the given column type on the current device idiom. | |
| (NSInteger) | - count: |
| Returns the number of items in the given section of the collection view. | |
| (CGPoint) | - ignoreContentOffsetForProposedContentOffset: |
Records the superclass's target offset for the proposed offset and freezes it, so that the next targetContentOffsetForProposedContentOffset: returns it verbatim. | |
| (void) | - cancelIgnoreOffset |
| Clears the frozen-offset flag so paging resumes deferring to the superclass. | |
| (CGFloat) | - frameScale |
| Returns the cell scale factor for the current column type. | |
| (instancetype) | - init |
| Caches the device idiom and clears the paging state. | |
| (void) | - dealloc |
| Tears the layout down. | |
| (void) | - prepareLayout |
| Lays the grid out, filling the cached attributes and the content width. | |
| (CGSize) | - collectionViewContentSize |
| The laid-out content size. | |
| (nullable NSArray< UICollectionViewLayoutAttributes * > *) | - layoutAttributesForElementsInRect: |
| The attributes of every cell intersecting a rectangle. | |
| (nullable UICollectionViewLayoutAttributes *) | - layoutAttributesForItemAtIndexPath: |
| The attributes of one cell. | |
| (BOOL) | - shouldInvalidateLayoutForBoundsChange: |
| Whether a bounds change invalidates the layout. | |
| (CGPoint) | - targetContentOffsetForProposedContentOffset: |
| The content offset to settle on, honouring a frozen offset when one is set. | |
Properties | |
| int | columnType |
| The column-type selector: 0 is the three-column grid, 1 the four-column grid, and 2 the five-column grid. | |
The song-grid layout for the music-selection collection view.
A UICollectionViewFlowLayout subclass that precomputes one UICollectionViewLayoutAttributes per song cell in prepareLayout, arranging them into a horizontally-paged grid whose column count, row count, cell size, inter-cell spacing, and margins all vary by device idiom (isPad, is4Inch, and deviceType) and by the columnType selector. It answers the content-size and attributes queries from that precomputed array, and implements snap-to-page paging through the ignoreContentOffsetForProposedContentOffset: / cancelIgnoreOffset machinery layered over the superclass's own paging.
| - (void) cancelIgnoreOffset |
Clears the frozen-offset flag so paging resumes deferring to the superclass.
| - (CGSize) collectionViewContentSize |
The laid-out content size.
| - (NSInteger) count: | (int) | section |
Returns the number of items in the given section of the collection view.
| section | The section index. |
| - (void) dealloc |
Tears the layout down.
| - (CGFloat) frameScale |
Returns the cell scale factor for the current column type.
| - (int) getXMargin: | (int) | columnType |
Returns the leading horizontal margin for the given column type on the current device idiom.
| columnType | The column-type selector. |
| - (int) getXSpace: | (int) | columnType |
Returns the horizontal spacing between adjacent cells for the given column type on the current device idiom.
| columnType | The column-type selector. |
| - (int) getYMargin: | (int) | columnType |
Returns the leading vertical margin for the given column type on the current device idiom.
| columnType | The column-type selector. |
| - (int) getYSpace: | (int) | columnType |
Returns the vertical spacing between adjacent cell rows for the given column type on the current device idiom.
| columnType | The column-type selector. |
| - (CGPoint) ignoreContentOffsetForProposedContentOffset: | (CGPoint) | proposedContentOffset |
Records the superclass's target offset for the proposed offset and freezes it, so that the next targetContentOffsetForProposedContentOffset: returns it verbatim.
| proposedContentOffset | The proposed content offset. |
| - (instancetype) init |
Caches the device idiom and clears the paging state.
| - (NSArray< UICollectionViewLayoutAttributes * > *) layoutAttributesForElementsInRect: | (CGRect) | rect |
The attributes of every cell intersecting a rectangle.
| rect | The rectangle to test against. |
rect . | - (UICollectionViewLayoutAttributes *) layoutAttributesForItemAtIndexPath: | (NSIndexPath *) | indexPath |
The attributes of one cell.
| indexPath | The cell's index path. |
| - (void) prepareLayout |
Lays the grid out, filling the cached attributes and the content width.
| - (BOOL) shouldInvalidateLayoutForBoundsChange: | (CGRect) | newBounds |
Whether a bounds change invalidates the layout.
| newBounds | The proposed new bounds. |
| - (CGPoint) targetContentOffsetForProposedContentOffset: | (CGPoint) | proposedContentOffset |
The content offset to settle on, honouring a frozen offset when one is set.
| proposedContentOffset | The offset the collection view proposes. |
|
readwritenonatomicassign |
The column-type selector: 0 is the three-column grid, 1 the four-column grid, and 2 the five-column grid.