A scroll tab alternative to UISegmentedControl.
pod 'ScrollTab'Add the files in the ScrollTab folder to your project.
#import "ScrollTab.h"
// ...
ScrollTabConfig *config = [[ScrollTabConfig alloc] init];
config.items = @[@"zero", @"one", @"two", @"three", @"four"];
ScrollTab *tab = [[ScrollTab alloc] init];
tab.config = config;
tab.selected = ^(NSString *noop, NSInteger index) {
NSLog(@"selected tab with index %@", @(index));
};
// Layout
[self.view addSubview:tab];
// ...Change the control's layout, item font/colors and more using ScrollTabConfig.
ScrollTab includes a sample project.
This project was tested with iOS 10, see the 1.x tags for older versions.
ScrollTab is available under the MIT license. See the LICENSE file for more info.