You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To get the full benefits import PinterestSegment wherever you import UIKit
import UIKit
import PinterestSegment
Carthage
Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/PinterestSegment.framework to an iOS project.
github"tbxark/PinterestSegment"
Manually
Download and drop PinterestSegment.swift in your project.
Congratulations!
Usage example
letstyle=PinterestSegmentStyle()
style.indicatorColor =UIColor(white:0.95, alpha:1)
style.titleMargin: CGFloat =15
style.titlePendingHorizontal: CGFloat =14
style.titlePendingVertical: CGFloat =14
style.titleFont =UIFont.boldSystemFont(ofSize:14)
style.normalTitleColor =UIColor.lightGray
style.selectedTitleColor =UIColor.darkGray
letsegment=PinterestSegment(frame:CGRect(x:20, y:200, width: w -40, height:40), style: style, titles:["Everything","Geek","Humor","Art","Food","Home","DIY","Wemoent' Style","Man's Style","Beauty","Travel"])
segment.valueChange ={ index in
// Do something here
}
You can also add icon for each title, Just like the blow demo gif