Latest 0.0.1
Homepage https://github.com/ojfoggin/OJFSegmentedProgressView
License MIT
Platforms ios , requires ARC
Authors

OJFSegmentedProgressView is a replacement for UIProgressView that displays in segments.

It has been written to have all the same properties and methods as UIProgressView (except the setProgress:animated: and the initWithStyle: constructor).

Style enum

typedef enum {
    OJFSegmentedProgressViewStyleDiscrete,
    OJFSegmentedProgressViewStyleContinuous,
} OJFSegmentedProgressViewStyle;

Properties

  1. OJFSegmentedProgressViewStyle style
  2. NSUInteger numberOfSegments
  3. float segmentSeparatorSize
  4. float progress
  5. UIColor trackTintColor
  6. UIColor progressTintColor

Constructor

  • (id)initWithNumberOfSegments:(NSUInteger)numberOfSegments;

Example Usage

- (void)viewDidLoad
{
    [super viewDidLoad];

    OJFSegmentedProgressView *progressView = [[OJFSegmentedProgressView alloc] initWithNumberOfSegments:13];
    [progressView setFrame:CGRectMake(20, 100, 280, 20)];
    [progressView setTrackTintColor:[UIColor lightGreyColor]];
    [progressView setProgressTintColor:[UIColor darkGreyColor]];
    [progressView setStyle:OJFSegmentedProgressViewStyleContinuous];
    [self.view addSubView:progressView];
}

CocoaPods text

pod 'OJFSegmentedProgressView', '~> 0.0.1'

Latest podspec

{
    "name": "OJFSegmentedProgressView",
    "version": "0.0.1",
    "summary": "A segmented progress view to easily replace UIProgressView.",
    "homepage": "https://github.com/ojfoggin/OJFSegmentedProgressView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Oliver Foggin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ojfoggin/OJFSegmentedProgressView.git",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": null
    },
    "source_files": "OJFSegmentedProgressView/OJFSegmentedProgressView.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This