IPMonthSelectorView
public class IPMonthSelectorView : UIView
extension IPMonthSelectorView: UICollectionViewDelegate, UICollectionViewDataSource
Month selector view
### Usage: ###
let monthSelectorView = IPMonthSelectorView(tabColor: .systemRed)
// Alternative when using with .xibs
monthSelectorView.set(tabColor: .systemRed)
monthSelectorView.set(currentMonth: 6)
monthSelectorView.handleMonthChange = { month in
// Closure to handle month selection
}
### Notes: ###
- It can be inherited on .xibs/.storyboards
-
Undocumented
Declaration
Swift
public var handleMonthChange: ((Int) -> ())?
-
Undocumented
Declaration
Swift
public init(tabColor: UIColor)
-
Undocumented
Declaration
Swift
public override init(frame: CGRect)
-
Set settings for the component from the given parameters.
Declaration
Swift
public func set(tabColor: UIColor)
Parameters
tabColor
Main color that will be use as theme for the component
-
Set settings for the component from the given parameters.
Declaration
Swift
public func set(currentMonth: Int)
Parameters
currentMonth
Month that will be presented in the center of the component
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)