• Stars
    star
    365
  • Rank 112,671 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 9 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

StepProgressView

Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

Swift Version Build Status License CocoaPods Compatible
Platform PRs Welcome

Usage

let progressView   = StepProgressView(frame: view.bounds)
progressView.steps = ["First", "Second", "Third", "Last"]
progressView.details = [0: "The beginning", 3: "The end"] // appears below step title

progressView.currentStep = 0 // started first step
...
progressView.currentStep = 4 // all done

SwiftUI Usage

StepsView(currentStep: $step, steps: ["First", "Second", "Third", "Done"])
    .stepShape(.rhombus)

Changing Appearance

The properties below can be set in Interface Builder, in code, or through a UIAppearance proxy (e.g., StepProgressView.appearance().stepShape = .circle). When using SwiftUI you can set them in the StepsView initializer or using SwiftUI view modifiers.

Shape of the step icons:

progressView.stepShape = .circle
progressView.firstStepShape = .rhombus
progressView.lastStepShape = .square
// also available: .triangle, .downTriangle

Text fonts and sizes:

progressView.textFont = myFont
progressView.detailFont = anotherFont

Line size spacing:

progressView.lineWidth = 2.5
progressView.verticalPadding = 8 // between steps (0 => default based on textFont)
progressView.horizontalPadding: 8 // between shape and text (0 => default based on textFont)

Colors:

progressView.tintColor = myGeneralTintColor

// alternatively:

progressView.currentStepColor = .red
progressView.pastStepColor = .gray
progressView.futureStepColor = .gray

progressView.currentStepFillColor = .yellow
progressView.pastStepFillColor = .gray
progressView.futureStepFillColor = .lightGray

progressView.currentTextColor = .blue
progressView.pastTextColor = .gray
progressView.futureTextColor = .lightGray
progressView.currentDetailColor = .cyan // nil => use currentStepColor

Installation

CocoaPods:

pod 'StepProgressView'

Legacy versions:

Swift version StepProgressView version
4.0 (Xcode 9.4) pod 'MiniLayout', '~> 1.2.1'
pod 'StepProgressView', '~> 1.4.1'
3 pod 'MiniLayout', '~> 1.1.0'
pod 'StepProgressView', '~> 1.3.0'
2.3 pod 'MiniLayout', '~> 1.0.1'
pod 'StepProgressView', '~> 1.2.1'

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/yonat/StepProgressView", from: "1.6.4")
]

Meta

@yonatsharon

https://github.com/yonat/StepProgressView

More Repositories

1

MultiSlider

UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizontal.
Swift
436
star
2

MultiSelectSegmentedControl

UISegmentedControl remake that supports selecting multiple segments, vertical stacking, combining text and images.
Swift
298
star
3

RadioGroup

The missing iOS radio buttons group.
Swift
191
star
4

SelectionList

Simple single-selection or multiple-selection checklist, based on UITableView
Swift
116
star
5

MultiToggleButton

Multiple state tap-to-toggle UIButton (like old camera flash button)
Swift
83
star
6

CheckmarkCollectionViewCell

UICollectionViewCell with checkbox when it isSelected and empty circle when not - like Photos.app "Select" mode.
Swift
64
star
7

CameraBackground

Show camera layer as a background to any UIView
Swift
63
star
8

BatteryView

Simple battery shaped UIView
Swift
52
star
9

BadgeLabel

Simple animatable badge, based on UILabel and using CALayer
Objective-C
49
star
10

MockImagePicker

Mock UIImagePickerController for testing camera based UI in simulator
Swift
22
star
11

ContactsChangeNotifier

Which contacts changed outside your iOS app? Better CNContactStoreDidChange notification: Get real changes, without the noise.
Swift
14
star
12

EditableList

Simple List of UITextField-s based on UITableViewController
Objective-C
13
star
13

SweeterSwift

Extensions and syntactic sugar to enrich the Swift standard library, iOS frameworks, and SwifterSwift.
Swift
11
star
14

YONAutoComplete

Add auto-completion to a UITextField
Objective-C
9
star
15

MiniLayout

Minimal AutoLayout convenience layer. Program constraints succinctly. ⚠️ Moved into https://github.com/yonat/SweeterSwift
Swift
8
star
16

AvailableHapticFeedback

Unified haptic feedback interface for all subclasses of UIFeedbackGenerator, with availability checks for iOS 9.
Swift
8
star
17

EasyBackgroundRefresh

Easy background refresh registration, scheduling, execution, and completion. BGTaskScheduler for the lazy.
Swift
8
star
18

SwiftQuality

Common configuration files for SwiftLint and SwiftFormat
Ruby
5
star
19

smart_ptr

Simple C++ Smart Pointer Classes
C
3
star
20

versionit

Simple bash script to change Xcode project version and build number, create git tag, and update podspec.
Shell
3
star
21

pointainer

STL Extensions for containers of pointers
C++
2
star
22

Blinker

mac app that reminds you to blink by displaying animated blinking eyes on your screen at regular intervals
Swift
2
star
23

DirectoryUploader

Automatically upload all files saved in source directory, and then delete the uploaded files.
Swift
1
star