I have two view controller that is to be switched by the SegmentControl, so for the 2nd VC I need to set the selected index to be the 2nd item,
and when I do that in NIB, it crashes
'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: selectedSegmentIndex < (NSInteger)self._items.count'
because self._items is null when this is called.
NSParameterAssert(selectedSegmentIndex < (NSInteger)self._items.count);
and if set "selectedIndex" in viewDidLoad code, then it doesn't show the arrow correctly, the title highlight animate to the right selection, but arrow remains unchanged..
net net, I cannot set the initial selectedIndex to anything other than 1