GDGauge Save

Easy to use, highly customizable gauge view

Project README

GDGauge - Customizable Gauge View

1

Requirements

  • Xcode 11+
  • Swift 5
  • iOS 9+

Installation

Swift Package Manager

.package(url: "https://github.com/saeid/GDGauge.git", from: "2.0.0")

Cocoapods (Not updated - Latest version "1.2.1")

pod 'GDGauge'

Usage

Import GDGauge

import GDGauge

Create an instance of GDGaugeView

var gaugeView = GDGaugeView(frame: view.bounds)

Setup, customize and build the view

        gaugeView
            .setupGuage(
                startDegree: CGFloat,
                endDegree: CGFloat,
                sectionGap: CGFloat,
                minValue: CGFloat,
                maxValue: CGFloat
            )
            .setupContainer(
                width: CGFloat,
                color: UIColor,
                handleColor: UIColor,
                options: GaugeOptions,
                indicatorsColor: UIColor,
                indicatorsValuesColor: UIColor,
                indicatorsFont: UIFont
            )
            .setupUnitTitle(
                title: String,
                font: UIFont
            )
            .buildGauge()

To update the handle value

gaugeView.updateValueTo(CGFloat)

To update colors when a limit is reached

gaugeView.updateColors(
    containerColor: UIColor,
    indicatorsColor: UIColor
)

To reset to initial colors

gaugeView.resetColors()

Licence

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

Open Source Agenda is not affiliated with "GDGauge" Project. README Source: saeid/GDGauge
Stars
80
Open Issues
1
Last Commit
1 year ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating