Skip to content

Releases: gmarm/BetterSegmentedControl

Release 2.0

21 Oct 11:31
a2b2116
Compare
Choose a tag to compare

Release notes

New features

  • Support for single segment, no segments
  • Support for no selected segment
  • Support for customizing .valueChanged behavior when calling setIndex()
  • iPad cursor support (iOS 13.4+)
  • Auto-sizing support when using Auto Layout
  • Improved accessibility / VoiceOver

Fixes

  • Fix Interface Builder / runtime color inconsistencies
  • Fix accessibility labels being read twice
  • Fix warnings in pod and example
  • Cover edge cases when setting index / segments

Other

  • Fully cover control with unit and snapshot tests
  • Add Slather support for calculating code coverage
  • Restructure internally for better readability and performance
  • Improve example view controller
  • Add logo and improve README with new demo GIFs

Breaking changes

  • When calling setIndex(), the .valueChanged event will now not be triggered by default. Use setIndex()'s shouldSendValueChangedEvent parameter to control this behavior
  • Default IB colors have been updated to match system's UISegmentedControl
  • Setting segments will now reset the index (no .valueChanged event will be triggered)

Swift Package Manager support and more!

10 Nov 12:59
Compare
Choose a tag to compare
  • You can now integrate BetterSegmentedControl via Swift Package Manager
  • Index change animation duration & damping are now customizable
  • Add convenient class variable for getting a control that resembles the native iOS 13 UISegmentedControl
  • Fix issue that was preventing shadows to be added for the indicator view
  • Fix issue with corner radius and indicator insets
  • Update for Swift 5.1
  • Minor formatting improvements here and there

Right to left languages support and more!

12 Jun 12:24
Compare
Choose a tag to compare
  • Right to left languages support
  • Number of lines now supported in label segments
  • Index is no longer UInt, but Int, like Apple recommends
  • Formatting fixes here and there
  • Minimum required iOS version bumped from 8.0 to 9.0

Images segments (and more)

22 Jul 15:49
Compare
Choose a tag to compare

This 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.

Swift 4.0

04 Oct 15:13
Compare
Choose a tag to compare

This release brings support for Swift 4.0 and a new way of configuration using enums for batch-configuring the control.

Indicator subviews, multiline titles

26 Apr 08:55
Compare
Choose a tag to compare

Adds more customizability options:

  • titleNumberOfLines controls the number of lines of the title labels
  • addSubviewToIndicator(_ view: UIView) adds subviews to the indicator view

Thanks to @amorde and @PoissonBallon for making this happen!

Customizable Borders

18 Dec 19:18
Compare
Choose a tag to compare
  • Adds 4 new public properties for customizing borders: indicatorViewBorderWidth, indicatorViewBorderColor, titleBorderWidth, titleBorderColor
  • Minor performance improvements
  • Formatting / naming improvements

Announces value immediately

17 Dec 18:45
Compare
Choose a tag to compare
  • Added property for announcing value immediately rather than waiting for animations to complete. This is now the default behavior.
  • Carthage shared scheme fix.

Swift 3.0

14 Sep 14:27
Compare
Choose a tag to compare
0.5

Selected title font

26 Jun 14:42
Compare
Choose a tag to compare

Property selectedTitleFont was added.