Giter Club home page Giter Club logo

clocket's Introduction

Clocket

Swift 4.2 Platform CI Status Version License

Description

Clocket is an iOS framework written in Swift 4.2 that makes it easy to create and customize clock views.

Features

  • Real time or custom time clock
  • Time setting by dragging or tapping clock hands
  • Countdown timer
  • Delegate method call on timer expiring
  • Reverse time
  • Custom time speed from -10X to 10X
  • Customizable clock hands: size, shape, color, shadow
  • Customizable clockface: logo, digits, marks, fonts, colors

Requirements

  • iOS 11.0+
  • Xcode 10.0
  • Swift 4.2

Installation

Clocket is available through CocoaPods. To be able to use the framework in your project:

  1. Install CocoaPods on your computer:
$ sudo gem install cocoapods
  1. Create a Podfile in your project directory and add the dependency:
use_frameworks!
platform :ios, '11.0'
target 'MyApp' do
  pod 'Clocket'
end
  1. Run pod install in the project directory:
$ cd <path/to/your/project/directory>
$ pod install
  1. Open MyApp.xcworkspace in Xcode and build.
  2. From now on you can import and use the framework in your code:
import Clocket

Usage

  1. Import the framework into ViewController.swift.
  2. Add a UIView into storyboard/xib file, and change it's class to Clocket in the identity inspector.
  3. Connect the view to variable clock in the ViewController.
  4. Set the real time property to true.
  5. Make startClock() call to start the clock.
import Clocket                            //1
class ViewController: UIViewController {  
    @IBOutlet weak var clock: Clocket!    //3
    override func viewDidLoad() {
        super.viewDidLoad()
        clock.displayRealTime = true      //4
        clock.startClock()                //5
    }
}

For more code examples on Clocket usage see the example project.

Author

Andrey Filonov, [email protected]

License

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

clocket's People

Contributors

afil310 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kodlios summic

clocket's Issues

Angle calculation heats up iPhone

First, I would like to thank you for the great clock App. It is really helpful to me and I appreciate your work.

One thing I noticed: The updateHands and its corresponding angle-Animation methods do consume a tremendous amount of CPU power. The result is a heated up iPhone !

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.