Latest 1.0.1
License MIT
Platforms ios 8.0
Dependencies SDWebImage

SCSegment supports setting up tabs with pictures using web pictures and local pictures.


  • Supports multiple style,including style of text, image and both text and image.
  • Supports display net images with ‘URL’.
  • Supports advanced title styling with text attributes for font and color.
  • Support horizontal scrolling and scroll to center.
  • Supports blocks to observe index changed.
  • Works with ARC and iOS >= 8.



The easiest way of installing SCSegment is via CocoaPods.

pod 'SCSegment'

Old-fashioned way

  • Add Core file to your project.
  • #import "SCSegment.h" where you want to add the control.


You can create ‘SCSegment’ instance by instance functions and class functions.

NSArray *titles = @[@"One", @"Two", @"Three", @"Four", @"Five",@"Six", @"Seven", @"Eight", @"Nine", @"Ten"];
NSString *urlString = @"";
NSArray *images = @[@"sc_normal", @"sc_normal", @"sc_normal", @"sc_normal", @"sc_normal", @"sc_normal", @"sc_normal", @"sc_normal", @"sc_normal", @"sc_normal"];
NSArray *selectedImages = @[@"urlString", @"sc_selected", @"sc_selected", @"sc_selected", @"sc_selected", @"sc_selected", @"sc_selected", @"urlString", @"sc_selected", @"sc_selected"];
SCSegment *textSegment = [[SCSegment alloc] initWithTitles:titles]; 
SCSegment *imageSegment = [[SCSegment alloc] initWithImages:images selectedImages:selectedImages];
SCSegment *textImageSegment = [[SCSegment alloc] initWithImages:images selectedImages:selectedImages titles:titles];


SCSegment *textSegment = [SCSegment segmentWithTitles:titles]; 
SCSegment *imageSegment = [SCSegment segmentWithImages:images selectedImages:selectedImages];
SCSegment *textImageSegment = [SCSegment segmentWithImages:images selectedImages:selectedImages titles:titles];

You can observe index by block like this:

segment.indexChangeBlock = ^(NSInteger index) {
    NSLog(@"to do something");

You can also set segment properties to change seagment appearence.If you want to know all usages,please check the ‘viewController.m’ file in the project.


  1. Don’t create instance with system init functions,because SCSegment forbids those functions.
  2. Please make sure of the number of the images and the number of the selected images are the same when the segment type is ‘SCSegmentTypeImage’.
  3. Please make sure of the number of the titles, images and selected images are same when the segment type is ‘SCSegmentTypeTextImage’.


SCSegment is licensed under the terms of the MIT License.

Latest podspec

    "name": "SCSegment",
    "version": "1.0.1",
    "summary": "SCSegment supports setting up tabs with pictures using web pictures and local pictures.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Samueler": "[email protected]"
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "source_files": [
    "dependencies": {
        "SDWebImage": [
            "~> 4.4.1"
    "resources": "SCSegment/Core/Segment/Supporting/SCSegmentBundle.bundle"

Pin It on Pinterest

Share This