Skip to content

Super simple implementation of segment control with the use of UICollectionView

Notifications You must be signed in to change notification settings

svoip/Segment-control-on-top-of-UICollectionView

Repository files navigation


//
// How each tab's width has to be calculated
//
public enum WidthDistributionMode {
    case equalSize
    case wrapText
}
public static let mode:WidthDistributionMode = .equalSize


//
// How the container of the tabs should position itself horizontally
//
public enum Position {
    case left
    case center
}
public static let position:Position = .center



// 
// Usage 1
// 

let position:Position = .center
let mode:WidthDistributionMode = .equalSize

alt text

// 
// Usage 2
// 

let position:Position = .left
let mode:WidthDistributionMode = .wrapText



alt text

About

Super simple implementation of segment control with the use of UICollectionView

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published