YBSlantedCollectionViewLayout
public class YBSlantedCollectionViewLayout: UICollectionViewLayout
YBSlantedCollectionViewLayout is a subclass of UICollectionViewLayout allowing the display of slanted content on UICollectionView.
By default, this UICollectionViewLayout has initialize a set of properties to work as designed.
-
The slanting delta.
By default, this property is set to
50
.Parameter
Parameter slantingDelta: The slantin deltaDeclaration
Swift
@IBInspectable public var slantingDelta: UInt = 50
Parameters
slantingDelta
The slantin delta
-
Reverse the slanting angle.
Set it to
true
to reverse the slanting angle. By default, this property is set tofalse
.Parameter
Parameter reverseSlantingAngle: The slanting angle reversing statusDeclaration
Swift
@IBInspectable public var reverseSlantingAngle: Bool = false
Parameters
reverseSlantingAngle
The slanting angle reversing status
-
Allows to disable the slanting for the first cell.
Set it to
false
to disable the slanting for the first cell. By default, this property is set totrue
.Parameter
Parameter firstCellSlantingEnabled: The first cell slanting statusDeclaration
Swift
@IBInspectable public var firstCellSlantingEnabled: Bool = true
Parameters
firstCellSlantingEnabled
The first cell slanting status
-
Allows to disable the slanting for the last cell.
Set it to
false
to disable the slanting for the last cell. By default, this property is set totrue
.Parameter
Parameter lastCellSlantingEnabled: The last cell slanting statusDeclaration
Swift
@IBInspectable public var lastCellSlantingEnabled: Bool = true
Parameters
lastCellSlantingEnabled
The last cell slanting status
-
The spacing to use between two items.
The spacing to use between two items. The default value of this property is 10.0.
Parameter
Parameter lineSpacing: The spacing to use between two itemsDeclaration
Swift
@IBInspectable public var lineSpacing: CGFloat = 10
Parameters
lineSpacing
The spacing to use between two items
-
The scroll direction of the grid.
The grid layout scrolls along one axis only, either horizontally or vertically. The default value of this property is
UICollectionViewScrollDirectionVertical
.Parameter
Parameter scrollDirection: The scroll direction of the gridDeclaration
Swift
public var scrollDirection: UICollectionViewScrollDirection = UICollectionViewScrollDirection.Vertical
Parameters
scrollDirection
The scroll direction of the grid
-
The item size options
Allows to set the item’s width/height depending on the scroll direction.
Declaration
Swift
public var itemSizeOptions: YBSlantedCollectionViewLayoutSizeOptions = YBSlantedCollectionViewLayoutSizeOptions()