Coder Social home page Coder Social logo

jmtimerbeam's Introduction

JMTimerBeam

Version Platform

JMTimerBeam enables you to show a decent beam on your OSX screen for visualizing a timing event. The beam will be attached to the top, right, bottom or left side of your screen and decreases steadily depending on the amount of time already elapsed.

Screenshots

JMTimerBeam Top

JMTimerBeam Left

Usage

To create a new timer beam on your screen simply crete a new instance of JMTimerBeam with one of the following two methods:

/// Init new timer beam with given duration, orientation, thichkness and color
- (id) initWithDuration:(NSTimeInterval) duration
            orientation:(JMTimerBeamOrientation) orientation
              thickness:(NSInteger) thickness
                  color:(NSColor*) color;

/// Initialize a new JMTimerBeam positioned on the left of the screen 
/// with decent thickness and green color
- (id) initWithDuration:(NSTimeInterval) duration;

After that use the start and stop method to start/stop the beam respectively. For positioning the beam on the screen use one of the following orientations:

typedef enum JMTimerBeamOrientations {
    JMTimerBeamOrientationTop,
    JMTimerBeamOrientationLeft,
    JMTimerBeamOrientationRight,
    JMTimerBeamOrientationBottom
} JMTimerBeamOrientation;

To get notified after the given duration elapsed and the beam ended implement the JMTimerBeamDelegate protocol with the method didFinishTimerBeam:.

To run the example project; clone the repo, and run pod install from the Project directory first.

Installation

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

pod "JMTimerBeam"

Author

Andreas Katzian, JadeMind

License

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

jmtimerbeam's People

Contributors

anka avatar

Stargazers

John Joyce avatar

Watchers

James Cloos 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.