subinspathilettu / SJSegmentedViewController

MIT License
334 stars 126 forks source link

How to set width of selected tabs indicator. #99

Open pradipibl opened 6 years ago

pradipibl commented 6 years ago

When I have 1 or 2 tabs then it will display full length of the indicator. please check this image.

simulator screen shot - iphone 8 plus - 2018-04-09 at 13 43 09

@subinsqburst please give me any suggestion on this issue.

ducbm051291 commented 6 years ago

Search for this function widthForSegment

and change

if totalWidth < Int(frame.size.width) {

into

if totalWidth > Int(frame.size.width) {