Latest 0.1.0
Homepage https://github.com/nikhilbatra789/NBGaugeView
License MIT
Platforms ios 8.0
Authors

CocoaPods Compatible
Platform iOS
License MIT

Screenshot

Introduction

NBGaugeView is a small library to create and display Gauge Views. It is fully customizable: you can set the color, size, text and many other properties of the gauge. This is a simple donut used for displaying text in hollow circle.

Requirements

  • iOS 8+
  • Xcode 9.0+

Installation

CocoaPods

Add the NBGaugeView pod into your project and run pod install

pod 'NBGaugeView'

Manual Install

Download NBGaugeVIew and import NBGaugeView.swift inside your xcode project.

Sample App

To start using NBGaugeView you can build the provided example project

  1. Open Example/NBGaugeView.xcodeproj in Xcode.
  2. Build and run.

Usage

It’s very easy to set up, just import NBGaugeView in your Swift code:

import NBGaugeView

Interface Builder:

Add an UIView with interface builder and set NBGaugeView as UIView custom class.

Link it with the outlet property declared in your code.

@IBOutlet private weak var gaugeView: NBGaugeView!

It’s simple to customize! Here’s an example of configuration of the view.

gaugeView.startAngle = 0
gaugeView.percentage = 60
gaugeView.thickness = 20
gaugeView.labelFont = UIFont.systemFont(ofSize: 40)
gaugeView.labelColor = UIColor.red
gaugeView.gaugeBackgroundColor = UIColor.gray
gaugeView.gaugeColor = UIColor.blue

Radius

Radius fo the view is automatically adjusted with min of width and height of the view.

Radius can be fetched using the below property at anytime.

let radius = gaugeView.radius

License

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

Latest podspec

{
    "name": "NBGaugeView",
    "version": "0.1.0",
    "summary": "NBGaugeView is a simple and customizable gauge control for iOS.",
    "description": "NBGaugeView is a simple donut used for displaying text in hollow circle.",
    "homepage": "https://github.com/nikhilbatra789/NBGaugeView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "NikhilBatra": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nikhilbatra789/NBGaugeView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "NBGaugeView/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This