Easy to use, highly customizable gauge view

Overview

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: "1.2.1")

Cocoapods

pod 'GDGauge'

Usage

Import GDGauge

import GDGauge

Create an instance of GDGaugeView

var gaugeView: GDGaugeView = 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,
                            shouldShowContainerBorder: Bool,
                            shouldShowFullCircle: Bool,
                            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.

You might also like...
A beautiful radar view to show nearby items (users, restaurants, ...) with ripple animation, fully customizable
A beautiful radar view to show nearby items (users, restaurants, ...) with ripple animation, fully customizable

HGRippleRadarView Example To run the example project, clone the repo, and run pod install from the Example directory first. This project is inspired b

The CITPincode package provides a customizable pincode view
The CITPincode package provides a customizable pincode view

The CITPincode package provides a customizable pincode view. It includes an optional resend code button with a built-in cooldown and an optional divider to be placed anywhere between the cells.

Powerful and easy-to-use vector graphics Swift library with SVG support
Powerful and easy-to-use vector graphics Swift library with SVG support

Macaw Powerful and easy-to-use vector graphics Swift library with SVG support We are a development agency building phenomenal apps. What is Macaw? Mac

Easy-to-use HStack that snaps to elements on scroll.

SnapToScroll Drop-in SwiftUI-based container view for horizontal snapping. example-video.mp4 Getting Started Using SnapToScroll is straightforward. Th

A child view controller framework that makes setting up your parent controllers as easy as pie.
A child view controller framework that makes setting up your parent controllers as easy as pie.

Description Family is a child view controller framework that makes setting up your parent controllers as easy as pie. With a simple yet powerful publi

An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.

LoadingShimmer An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. Thi

Windless makes it easy to implement invisible layout loading view.
Windless makes it easy to implement invisible layout loading view.

Windless Windless makes it easy to implement invisible layout loading view. Contents Requirements Installation Usage Looks Credits Communication Licen

A way to quickly add a notification badge icon to any view. Make any view of a full-fledged animated notification center.
A way to quickly add a notification badge icon to any view. Make any view of a full-fledged animated notification center.

BadgeHub A way to quickly add a notification badge icon to any view. Demo/Example For demo: $ pod try BadgeHub To run the example project, clone the r

Confetti View lets you create a magnificent confetti view in your app
Confetti View lets you create a magnificent confetti view in your app

ConfettiView Confetti View lets you create a magnificent confetti view in your app. This was inspired by House Party app's login screen. Written in Sw

Comments
  • CRASH !!

    CRASH !!

    Hey I got crash with sample project.

    Crash in this function

    public func resetColors(){
            UIView.animate(withDuration: 0.4) {
                self.baseCircleShape.strokeColor = self.baseColor.cgColor // Crash here  because self.baseCircleShape is nil 
                self.handleShape.fillColor = self.handleColor.cgColor
                for layer in self.firstIndicatorsSerie{
                    layer.strokeColor = self.sepratorColor.cgColor
                }
                for layer in self.secondIndicatorsSerie{
                    layer.strokeColor = self.sepratorColor.cgColor
                }
            }
        }
    
    

    How to reproduce

    In sample project

    uncomment this line speed.showBorder = false

    opened by PrashantKT 2
  • I have a question of GDGauge

    I have a question of GDGauge

    how can i change baseColor after render??? i have a real time sensor want to connect if the data is over 50 will be red and less will be green. and i cannot change the color right now

    enhancement 
    opened by mitchlau 2
Owner
Saeid
iOS Developer
Saeid
Highly customizable Action Sheet Controller with Assets Preview written in Swift

PPAssetsActionController Play with me ▶️ ?? If you want to play with me, just tap here and enjoy! ?? ?? Show me ?? Try me ?? The easiest way to try me

Pavel Pantus 72 Feb 4, 2022
UIPheonix is a super easy, flexible, dynamic and highly scalable UI framework + concept for building reusable component/control-driven apps for macOS, iOS and tvOS

UIPheonix is a super easy, flexible, dynamic and highly scalable UI framework + concept for building reusable component/control-driven apps for macOS, iOS and tvOS

Mohsan Khan 29 Sep 9, 2022
An easy to use UI component to help display a signal bar with an added customizable fill animation

TZSignalStrengthView for iOS Introduction TZSignalStrengthView is an easy to use UI component to help display a signal bar with an added customizable

TrianglZ LLC 22 May 14, 2022
📖 A simple, highly informative page view controller

TL;DR UIPageViewController done properly. ⭐️ Features Simplified data source management & enhanced delegation. Dynamically insert & remove pages. Infi

UI At Six 1.8k Dec 24, 2022
An easy to use FAQ view for iOS written in Swift

FAQView An easy to use FAQ view for iOS written in Swift. This view is a subclass of UIView. Setup with CocoaPods If you are using CocoaPods add this

Mukesh Thawani 467 Dec 5, 2022
An easy to use FAQ view for iOS written in Swift

FAQView An easy to use FAQ view for iOS written in Swift. This view is a subclass of UIView. Setup with CocoaPods If you are using CocoaPods add this

Mukesh Thawani 466 Nov 9, 2021
Declarative, configurable & highly reusable UI development as making Lego bricks.

LeeGo is a lightweight Swift framework that helps you decouple & modularise your UI component into small pieces of LEGO style's bricks, to make UI dev

WANG Shengjia 969 Dec 29, 2022
A highly configurable and out-of-the-box-pretty UI library

We absolutely love beautiful interfaces! As an organization named Unicorn, we are obligated to be unique and majestic.

Clayton (McIlrath) Unicorn 225 Feb 11, 2022
SwiftUI components and extensions that seem to be highly reusable

SwiftUI components and extensions that seem to be highly reusable

Yusuke Hosonuma 56 Dec 15, 2022
A simple, customizable view for efficiently collecting country information in iOS apps.

CountryPickerView CountryPickerView is a simple, customizable view for selecting countries in iOS apps. You can clone/download the repository and run

Kizito Nwose 459 Dec 27, 2022