Eugene Shevtsov

2pods

SmartSegmentedControl

This control was created to solve issue, that native UISegmentedControl has. Reffer to SmartSegmentedControlSwift for swift version. UISegmentedControl has issue with apportionsSegmentWidthsByContent setting (adjust segments width proportionally to content). Often, it appears that control bounds are wider, than actual segments width. With SmartSegmentedControl issue is fixed. Also, SmartSegmentedControl introduces “smart” mode, where, if there is enough room, every segment, that needs to be wider than average width, gets enough room to display content (which is usually less then in proportional mode). If there is no enough room for all content - segments width is distributed proportionally (fixed, of course :) ).

NOTE. SmartSegmentedControl is designed and test only to work with segments with titles, not with images.

License: MIT

  • Objective C

SVSegmentedControlSwift

This control was created to solve issue, that native UISegmentedControl has. Reffer to SVSegmentedControl for obj-c version. UISegmentedControl has issue with apportionsSegmentWidthsByContent setting (adjust segments width proportionally to content). Often, it appears that control bounds are wider, than actual segments width. With SVSegmentedControl issue is fixed. Also, SVSegmentedControl introduces “smart” mode, where, if there is enough room, every segment, that needs to be wider than average width, gets enough room to display content (which is usually less then in proportional mode). If there is no enough room for all content - segments width is distributed proportionally (fixed, of course :) ). NOTE. SVSegmentedControl is designed and test only to work with segments with titles, not with images.

License: MIT

  • Swift