IPTabSelectorView
public class IPTabSelectorView : UIView
extension IPTabSelectorView: UICollectionViewDelegate, UICollectionViewDataSource
Tab selector view
### Usage: ###
let tabView = IPTabSelectorView(items: ["Item 1", "Item 2"], tabColor: .systemRed)
// Alternative when using with .xibs
tabView.set(items: ["Item 1", "Item 2"], tabColor: .systemRed)
tabView.handleItemChange = { itemIndex in
// Closure to handle item selection
}
### Notes: ###
- It can be inherited on .xibs/.storyboards
-
Undocumented
Declaration
Swift
public var handleItemChange: ((Int) -> ())?
-
Undocumented
Declaration
Swift
public init(items: [String], tabColor: UIColor)
-
Undocumented
Declaration
Swift
public override init(frame: CGRect)
-
Set settings for the component from the given parameters.
Declaration
Swift
public func set(items: [String], 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(currentIndex index: 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)