Latest 1.1.1
Homepage https://github.com/saeid/GDGauge
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit
Authors

Full Customizable, Beautiful gauge view.

Completely written with ShapeLayers and CoreGraphic to get a most clean and smooth, everything!

[ Now with more options to customize! ]

1

2

gauge

Requirements

  • Xcode 9+
  • Swift 4
  • iOS 8+

Installation

Install manually

Drag GDGauge.swift to your project and use!

Using Cocoapods

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'GDGauge'
end

pod update then pod install

How to use

    override func viewDidLoad() {
        super.viewDidLoad()

        // Create and instatiate the view and set parameters
        speed = GDGaugeView(frame: view.bounds)

        // Set main gauge view color
        speed.baseColor = UIColor.cyan

        // Show circle border
        speed.showBorder = true

        // Show full circle border if .showBorder is set to true
        speed.fullBorder = false

        // Set starting degree based on zero degree on bottom center of circle space
        speed.startDegree = 45.0

        // Set ending degree based on zero degree on bottom center of circle space
        speed.endDegree = 270.0

        // Minimum value
        speed.min = 0.0

        // Maximum value
        speed.max = 16

        // Determine each step value
        speed.stepValue = 4.0

        // Color of handle
        speed.handleColor = UIColor.cyan

        // Color of seprators
        speed.sepratorColor = UIColor.black

        // Color of texts
        speed.textColor = UIColor.black

        // Center indicator text
        speed.unitText = "mb/s"

        // Center indicator font
        speed.unitTextFont = UIFont.systemFont(ofSize: 10)

        // Indicators text
        speed.textFont = UIFont.systemFont(ofSize: 20)
        view.addSubview(speed)

        /// After configuring the component, call setupView() method to create the gauge view
        speed.setupView() 

    }

Check sample project for details and lots of more info!

Licence

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

Latest podspec

{
    "name": "GDGauge",
    "version": "1.1.1",
    "summary": "Full Customizable, Beautiful, Easy to use gauge view",
    "homepage": "https://github.com/saeid/GDGauge",
    "license": "MIT",
    "authors": {
        "Saeid Basirnia": "[email protected]"
    },
    "source": {
        "git": "https://github.com/saeid/GDGauge.git",
        "tag": "1.1.1"
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "swift_version": "4.0",
    "source_files": "source/GDGauge/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This