Make sure index is validated.
Merge pull request #45 from alexandreos/master

Add support for non-animated selections.
Refactoring and code style fixes
Fixes control not being displayed properly when segmentWidthStyle equals HMSegmentedControlSegmentWidthStyleDynamic
Merge branch 'master' of https://github.com/shjborage/HMSegmentedControl into shjborage-master
Initializes CGPoints used to draw arrow to CGPointZero
Removes setting deprecated scrollEnabled property.
Fixes y value for HMSegmentedControlType of HMSegmentedControlTypeTextImages and HMSegmentedControlTypeImages so that it is a function of the the value of HMSegmentedControlSelectionIndicatorLocation
Add support for custom box layer opacity.