Single Source of Truth for the Current Index
Single Source of Truth for the Current Index

The fact that previously there was one computed property, named currentIndex, that was always computed correctly based on the layout of the views, and one variable named currentSelectedIndex, that wasn't being updated inside the method selectItemAt(), created an inconsistency between the two values. This led to an incorrect selection when returning from the background state. Now the source of truth is _currentIndex and the computed property currentIndex limits the outside access to read-only.

tapptitude/TTSegmentedControl,tapptitude/TTSegmentedControl