Setting a starting selectedIndex other than 0 moves the UIButtons in XMSegmentedControl
Hello guys,
Whenever we have a fixed number of icons in XMSegmentedControl and we set the starting selectedIndex to something other than 0 the UIButtons get displaced.
Line 276 in XMSegmentedControl.swift should be:
let frame = CGRect(x: 0 + (CGFloat(i) * width), y: 0, width: width, height: height)
Instead of:
let frame = CGRect(x: starting + (CGFloat(i) * width), y: 0, width: width, height: height)
At least for the fixed icon case. Or.. we need to fix the starting problem which sounds more like the appropriate solution.
Intended Behavior:

Wrong Behavior:

Bump, I am having this issue too.
If you do what is specified above you will fix that problem. Just replace that one line and then you can set the position you want it in.