GithubHelp home page GithubHelp logo

carabina / flexiblegauge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mohsinalimat/flexiblegauge

0.0 2.0 0.0 351 KB

A gauge for multiple purposes.

License: MIT License

Objective-C 51.71% Ruby 4.47% Shell 43.83%

flexiblegauge's Introduction

FlexibleGauge

With this animated gauge you will be able to create flexible gauges with or without images in or out of the gauge circle.

screenshot

animated

Build Requirements

iOS

9.3+

Installation

pod 'FlexibleGauge'

Adding To Project

You can add MultipleGaugeAnimated as a cocoapod with 'pod MultipleGaugeAnimated' or you can add it as a resource

Usage

You may add via interface designer

1. Add the resource class

adding via designer

2. Enter mandatory requirements

'New value' vs 'Value' --> If you are willing to see an animation, then you should animate the gauge from Value to New value, lets say your starting value of the gauge is 50, then you should assign 'Value' as 0 to start animation from 0, and assign 'New value' as 50 so that it will animate to 50 from 0. You may also assign the values of the gauge via the code, you just need to connect it to the view as an outlet and call:

-(void)refreshGraph:(CGFloat)newValue withAnimation:(Boolean)withAnimation;

//call the method above from the view class that your outlet is connected as:
[self.gauge refreshGraph:50 withAnimation:YES];

You may add via code

Example:

@property (weak, nonatomic) IBOutlet UIView *gaugeView;
@property(strong, nonatomic) Gauge *gauge;

self.gauge = [[Gauge alloc] initWithFrame:self.gaugeView.bounds];
[self.gauge setDefaultProperties];
[self.gauge setOuterTextProperties:@"outer 2" textColor:[UIColor darkGrayColor] font:[UIFont fontWithName:@"HelveticaNeue" size:11]];
[self.gauge setOuterImageProperties:[UIImage imageNamed:@"business"] imageSize:CGSizeMake(15, 15)];
[self.gauge setNeedsDisplay];
[self.gaugeView addSubview:self.gauge];

//To animate the value use this method
//You need to animate it when the view is already visible for instance in viewDidAppear method
[self.gauge animateGauge];

flexiblegauge's People

Contributors

ebrugungor avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.