Kit for building custom gauges + easy reproducible Apple's style ring gauges.

Overview

Version Build Status Carthage compatible language License Platform

GaugeKit

##Kit for building custom gauges + easy reproducible Apple's style ring gauges.

->

Example Usage

Open GaugeKit.xcworkspace and change the scheme to 'Example' and run Example project.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

GaugeKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

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

pod "GaugeKit"

Carthage

To integrate GaugeKit into your Xcode project using Carthage, specify it in your Cartfile:

github "skywinder/GaugeKit" >= 0.2

Embedded Framework

Add GaugeKit as a submodule by opening the Terminal, cd-ing into your top-level project directory, and entering the following command:

$ git submodule add https://github.com/skywinder/GaugeKit.git

Manually

If you prefer not to use either of the aforementioned dependency managers, you can simply add swift files into your project manually.

Features

  • Flexible and high-customizible gauges
  • Auto-resized views
  • Support @IBInspectable & @IBDesignable
  • Written with vanilla Swift flavor 🐤

Usage 🌈

  • Put on storyboard UIView, and set them class Gauge and module GaugeKit:

GaugeKit

  • Select type of gauge (property type in class or gaugeTypeInt for changes directly in Interface builder)

     - case `Circle`
     - case `Left`
     - case `Right`
     - case `Line`
    

##Example:

GaugeKit GaugeKit

###IB Example:

GaugeKit

Requirements

  • iOS SDK 7.0 or later (iOS SDK 8.0 if you use it as a Framework)
  • Swift 1.2 and Xcode 6.3 or later
  • Swift 2.x.x is also supported!

Communication 🔈

Bug reports, feature requests, patches, well-wishes are always welcome!

Contributing :octocat:

I'd love to see your ideas for improving this library.

The best way to contribute is by submitting a pull request.

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

License

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

Comments
  • iOS 10 Beta Support

    iOS 10 Beta Support

    Hi, I would really like to use GuageKit in an upcoming project, as it will make my life much easier in designing some cool gauges. Tried importing it into my new project and there are 56 errors, mostly related to changes Apple made in Swift 3. Do you have plans on updating GuageKit for iOS 10? Is there any plans for GuageKit on WatchOS 3? Do you have a version you are testing for iOS 10 Beta, that I may be able to get access to early? Thank you very much in advance. I have been looking all over for this type of Pod, and this helps a lot, assuming you plan to update it for iOS10.

    waiting for reply 
    opened by sdevo619 11
  • Added rate animations

    Added rate animations

    Basically everything happens in :

    • Gauge+Animations.swift (new file)
    • MainViewController.swift (changed)

    And I had to add two variables :

    • animationTimer
    • animationCompletionBlock

    Now, I absolutely DON'T get the easy part of the job, shame on me... I don't get how to update the framework in the example. So the example won't compile for now. I was not able to test the final result, but it should work no problem.

    opened by dpelletier2017 11
  • Add ability to add gradient colors for Circle gauge.

    Add ability to add gradient colors for Circle gauge.

    It's subtask of #12.

    I start working on it in gradientCircle branch, but implementation is not quite easy and still have issues.

    Also - it looks not very well without overlapping (the border of startColor and endColor). I want to find solution, that can fix this and #12 issue at once. screen shot 2015-08-03 at 09 29 08

    enhancement help wanted 
    opened by skywinder 11
  • Change Color programmatically for dynamically created gauge.

    Change Color programmatically for dynamically created gauge.

    Hi I am displaying the gauge in CellForRowAtIndexPath and I tried changing the color of gauge depending on its value this is my actual code of doing it

    if result! > 0 && result! < 26 { cell.gauge.startColor = UIColor.redColor() cell.gauge.endColor = UIColor.redColor() } else if result! > 25 && result! < 51 { cell.gauge.startColor = UIColor.orangeColor() cell.gauge.endColor = UIColor.orangeColor() } else if result! > 50 && result < 76 { cell.gauge.startColor = UIColor.yellowColor() cell.gauge.endColor = UIColor.yellowColor() } else { cell.gauge.startColor = UIColor.greenColor() cell.gauge.endColor = UIColor.greenColor() }

    but it doesn't seem to work it keeps displaying the color i set in mainStoryBoard. The if condition works fine it reads the code in each scenario but it doesn't render the color I need.

    bug 
    opened by francisadelante 7
  • Implement a maxValue

    Implement a maxValue

    Hey, first of all thank you for this project.

    What I need you to help me think is how can I implement a maxValue feature like a UISlider so if I have a timer it goes and finish at the same time as the timer or if there's a way already can you be so kind to explain how to implement it because rate works perfectly but I need to increment de Gauge proportionally a Timer I have.

    Let me know if you need more context and thank you very much for your help.

    enhancement 
    opened by ghost 5
  • start and stop points

    start and stop points

    Is it possible to smaller arcs? I want to try to do a series of arcs on the same path. First segment say 10degrees, then a gap, then a new segment of 40degress, then a small gap and then another segment.

    Or simply point me to how to creat say a 20 degree arc. Both ends need to be rounded so I can’t just turn it white for thev160 degrees left.

    Thank you

    waiting for reply 
    opened by jimijon 4
  • Support for iOS 12 and Xcode 10 beta

    Support for iOS 12 and Xcode 10 beta

    I know that is too early to ask, but we are with a little problem on GaugeKit in iOS 12 using Xcode 10 beta. The GaugeKit was working fine in my app until the last version, but when I updated to iOS 12 and Xcode 10, the app doesn't compile anymore.

    This is what I receive from xcode. Showing Recent Messages :-1: Multiple commands produce '/Users/…/Library/Developer/Xcode/DerivedData/…/Build/Products/Debug-iphoneos/GaugeKit/GaugeKit.framework/Info.plist':

    1. Target 'GaugeKit' has copy command from '/Users/…/Desktop/…/Pods/GaugeKit/GaugeKit/Info.plist' to '/Users/…/Library/Developer/Xcode/DerivedData/…/Build/Products/Debug-iphoneos/GaugeKit/GaugeKit.framework/Info.plist'
    2. Target 'GaugeKit' has process command with input '/Users/…/Desktop/…/Pods/Target Support Files/GaugeKit/Info.plist'

    Could you help me?

    wontfix 
    opened by costaneto222 4
  • Swift 4 support

    Swift 4 support

    Hello, thanks for this very useful project. For making it compatible with Swift 4 you just needs to do the following modification :

    In file Gauge+Animations.swift the function: func updateProgress(_ timer: Timer) -> Void needs to have @objc to respond to the selector: @objc func updateProgress(_ timer: Timer) -> Void

    opened by argomis 4
  • CocoaPods failed: required code signature missing for 'GaugeKit.framework'

    CocoaPods failed: required code signature missing for 'GaugeKit.framework'

    Hi, I would love to use your beautiful control, but I can't get it to work. I used CocoaPods for importing it, then add @objc in the method requested for swift 4 support. But then I get this error:

    ../Main.storyboard: error: IB Designables: Failed to render and update auto layout status for ProvaViewController (Rn0-yv-HO4): dlopen(GaugeKit.framework, 1): no suitable image found. Did find: GaugeKit.framework: required code signature missing for 'GaugeKit.framework'

    Can you help me please?

    bug 
    opened by Silvia4 3
  • Fix color blending

    Fix color blending

    This patch will correctly blend colors for gauges with multi-color array defined. There was a problem using the average of the Int-value of colors. The red, green and blue values needed to be averaged separately. Also, since this is correct now, the same mechanism works for 1, 2 and more colors.

    opened by jpalten 2
  • Gauge+Animations updateProgress not exposed to Objective-C

    Gauge+Animations updateProgress not exposed to Objective-C

    pod spec lint
    
     -> ZMAppFoundation (0.1.5)
        - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
        - ERROR | xcodebuild:  GaugeKit/GaugeKit/Gauge+Animations.swift:22:23: error: argument of '#selector' refers to instance method 'updateProgress' that is not exposed to Objective-C
        - NOTE  | xcodebuild:  GaugeKit/GaugeKit/Gauge+Animations.swift:32:10: note: add '@objc' to expose this instance method to Objective-C
    
    Analyzed 1 podspec.
    

    I have a cocoa pod that uses gauge kit as a dependency (https://github.com/jfosterdavis/ZMAppFoundation/tree/release-0.1.5). When I am doing local development I change line Gauge+Animations.swift:32:10 from: func updateProgress(_ timer: Timer) -> Void { to @objc func updateProgress(_ timer: Timer) -> Void {

    opened by jfosterdavis 2
  • Circle type gauges not respecting endColor

    Circle type gauges not respecting endColor

    When using a circle gauge (type4) the end color is ignored. This can be seen in the example app where the innermost gauge has a start and end color but is locked to the start color.

    This may be intentional since the ends coming together is probably strange with two colors but I wanted to confirm before we changed our UX.

    This tools is so great. Thanks!

    bug help wanted waiting for reply 
    opened by siberian1967 4
  • Overlapping rings ( like in apple's activity app )

    Overlapping rings ( like in apple's activity app )

    As Dave mention in iOS Dev Weekly - Issue 205.

    It doesn't do the fancy overlapping rings

    So, he is definitely right! It should be implemented in next release!

    img_4487 images

    enhancement help wanted 
    opened by skywinder 2
Owner
Petr Korolev
Write the code. Change the world.
Petr Korolev
💾 A collection of classic-style UI components for iOS

A collection of classic-style UI components for UIKit, influenced by Windows 95 Introduction This is a little exploration into applying '90s-era desig

Blake Tsuzaki 2.2k Dec 22, 2022
Newly is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button

Newly is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button. It can be used to notify user about new content availability and can other actions can be triggers using its delegate method.

Dhiraj Rajendra Jadhao 197 Sep 22, 2022
ElongationPreview is an elegant UI push-pop style view controller

ElongationPreview is an elegant UI push-pop style view controller

Ramotion 886 Dec 19, 2022
Provides an iOS view controller allowing a user to draw their signature with their finger in a realistic style.

Swift version now available! Mimicking pen-on-paper signatures with a touch screen presents a difficult set of challenges. The rate touch events are e

Uber Open Source 1.3k Jan 6, 2023
Elegant Apply Style by Swift Method Chain.🌙

ApplyStyleKit ApplyStyleKit is a library that applies styles to UIKit using Swifty Method Chain. Normally, when applying styles to UIView etc.,it is n

shindyu 203 Nov 22, 2022
A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView and iPhone X safe area support for content reloading. Built for iOS 10 and later.

Arale A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView support for reloading your content. Built f

Putra Z. 43 Feb 4, 2022
Custom segue for OSX Storyboards with slide and cross fade effects (NSViewControllerTransitionOptions)

CustomSegue Custom segue for OSX Storyboards. Slide and cross fade effects, new customized window. class MyViewController: NSViewController { overr

Eric Marchand 123 May 21, 2022
A custom reusable circular / progress slider control for iOS application.

HGCircularSlider Example To run the example project, clone the repo, and run pod install from the Example directory first. You also may like HGPlaceho

Hamza Ghazouani 2.4k Jan 6, 2023
Custom emojis are a fun way to bring more life and customizability to your apps.

Custom emojis are a fun way to bring more life and customizability to your apps. They're available in some of the most popular apps, such as Slack, Di

Stream 244 Dec 11, 2022
Custom Beautiful UIView For Handling IDs in iOS

IDView Custom Beautiful UIView For Handling IDs in iOS Setup Set the placeholder images for the front and back faces. override func viewDidLoad()

Omar Labib 6 Aug 21, 2021
iOS custom controller used in Jobandtalent app to present new view controllers as cards

CardStackController iOS custom controller used in the Jobandtalent app to present new view controllers as cards. This controller behaves very similar

jobandtalent 527 Dec 15, 2022
DGFadingLabel - A custom UILabel that fades away the end of your text when text is too large to fit within the label's frame

A custom UILabel that fades away the end of your text when text is too large to fit within the label's frame.

donggyu 4 Jun 10, 2022
A custom UIControl which functions like UISlider where you can set multiple intervals with different step values for each interval.

MultiStepSlider A custom UIControl which functions like UISlider where you can set multiple intervals with different step values for each interval. Th

Susmita Horrow 25 Apr 28, 2022
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

Christoffer Winterkvist 246 Dec 28, 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 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

Jogendra 1.4k Jan 4, 2023
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

Exyte 5.9k Jan 1, 2023
An iOS Library that makes shadows management easy on UIView.

ShadowView is an iOS Shadow library that makes view's shadow implementation easy and sweet ?? ?? . Add simple shadows to add a gaussian blurred projec

Pierre 404 Dec 8, 2022
Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle.

Twinkle ✨ Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle. This library creates several CAEmitterLayers and animate

patrick piemonte 600 Nov 24, 2022