Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DGP13/SegmentedProgressBar

Repository files navigation

Swift Version twitter: @dylan36032

SegmentedProgressBar

A simple little control that animates segments like Snapchat or Instagram Stories.

Screenshot

Requirements

  • iOS 8.0+
  • Xcode 8

Installation

Drag and drop SegmentedProgressBar.swift into your project. That's it.

Usage

let spb = SegmentedProgressBar(numberOfSegments: 3, duration: 5)
spb.frame = CGRect(x: 15, y: 15, width: view.frame.width - 30, height: 4)
view.addSubview(spb)
spb.startAnimation()

Additional Stuff

Delegate:

spb.delegate = self // has to conform to SegmentedProgressBarDelegate
func segmentedProgressBarChangedIndex(index: Int) {
}
func segmentedProgressBarFinished() {
}

Styling:

spb.topColor = UIColor.white
spb.bottomColor = UIColor.white.withAlphaComponent(0.25)
spb.padding = 2

Pausing / Resuming

spb.isPaused = true
spb.isPaused = false

Skip / Rewind

spb.skip()
spb.rewind()

About

Snapchat / Instagram Stories like progress indicator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%

AltStyle によって変換されたページ (->オリジナル) /