An easy to use, customizable replacement for UISegmentedControl & UISwitch.
.valueChanged
behavior when calling setIndex()
setIndex()
, the .valueChanged
event will now not be triggered by default. Use setIndex()
's shouldSendValueChangedEvent
parameter to control this behaviorUISegmentedControl
segments
will now reset the index
(no .valueChanged
event will be triggered)UISegmentedControl
UInt
, but Int
, like Apple recommendsThis release adds support for any kind of segments. As a first addition, IconSegment
has been added, in addition to the LabelSegment
that was previously supported by default.
Additionally, tests have been completely rewritten and are now Snapshot tests.
Several minor usability and formatting updates.
This release brings support for Swift 4.0 and a new way of configuration using enums for batch-configuring the control.
Adds more customizability options:
titleNumberOfLines
controls the number of lines of the title labelsaddSubviewToIndicator(_ view: UIView)
adds subviews to the indicator viewThanks to @amorde and @PoissonBallon for making this happen!
indicatorViewBorderWidth
, indicatorViewBorderColor
, titleBorderWidth
, titleBorderColor
Property selectedTitleFont
was added.