Latest 2.0.0
Homepage https://github.com/dkhamsing/ScrollTab
License MIT
Platforms ios 9.0, requires ARC
Authors

A scroll tab alternative to UISegmentedControl.

Install

CocoaPods

pod 'ScrollTab'

Manual

Add the files in the ScrollTab folder to your project.

Usage

#import "ScrollTab.h"

  // ...

  ScrollTab *tab = [[ScrollTab alloc] init];

  ScrollTabConfig *config = [[ScrollTabConfig alloc] init];
  config.items = @[@"zero", @"one", @"two", @"three", @"four"];
  tab.config = config;

  tab.selected = ^(NSString *noop, NSInteger index) {
      NSLog(@"selected tab with index %@", @(index));
  };

  // Layout
  [self.view addSubview:tab];
  // ...

Customize

Change the control’s layout, item font/colors and more using ScrollTabConfig.

Demo

ScrollTab includes a sample project.

Compatibility

This project was tested with iOS 10, see the 1.x tags for older versions.

Contact

License

ScrollTab is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "ScrollTab",
    "version": "2.0.0",
    "summary": "Scrolling Tab",
    "description": "A scroll tab alternative to UISegmentedControl.",
    "homepage": "https://github.com/dkhamsing/ScrollTab",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "dkhamsing": "[email protected]"
    },
    "social_media_url": "http://twitter.com/dkhamsing",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/dkhamsing/ScrollTab.git",
        "tag": "2.0.0"
    },
    "source_files": "ScrollTab/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This