Git Product home page Git Product logo

dogekit's Introduction

DogeKit for iOS - Dogeumentation

Example

DogeKit was inspired by this project. Use it as you like.

Installation

If you use Cocoapods: pod 'DogeKit' then #include "DogeKit.h"

If not, just copy DogeKit.h and DogeKit.m into your project, and whereever you'd like to use it, just include it.

#include "DogeKit.h"

Usage

DogeKit *dk = [[DogeKit alloc] initWithTargetView:self.view]; //Init with a target view

[dk start]; //Start adding comments to your view

[dk stop]; //Stop adding comments to your view

Or you can use the sharedInstance. So you can have DogeKit supported all throughout your application if you want.

For example you can set it up so no matter what view you are in, if you tap on the navigation bar (or something) DogeKit will be triggered

In AppDelegate or somewhere

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
	
	UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
	
	// Add gesture recognizer to toggle DogeKit if two figer tap 
	// is done on navigation bar
	UITapGestureRecognizer *superTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toggleDogeKit)];
       superTap.numberOfTapsRequired = 1;
       superTap.numberOfTouchesRequired = 2;
       [navigationController.navigationBar addGestureRecognizer:superTap];
       
	return YES;
}

// More AppDelegate Code...

- (void)toggleDogeKit {
    [[DogeKit sharedInstance] toggle];
}	

Extras

You can set your own 'things' too. These are then printed with prefixes. Prefixes are stored in a mutable array so you can change them as you like. You could consider changing out the prefixes for all the text in the user's current context. Such news. Much stocks. Wow.

dk.things = [NSMutableArray arrayWithObjects:<(id), ...>, nil];

DogeKitDelegate

'Things' get even more powerful when you implement the DogeKitDelgate.

// After initilization

dk.delegate = self;
[dk createThings]; //Will traverse your hierarchy and pull out words and feed them to your delegate method.

#pragma mark -
#pragma mark DogeKitDelegate methods

-(BOOL)allowWordInThings:(NSString *)word{
    if (word.length > 4) { //A very simple filter
        return YES;
    } else return NO;
}

Clearing

If you really wanted to, you can also clear the labels again thanks to this pull request

[dk clear];

Label control

You can control the rotation and size of the lables with the minSize, maxSize and shouldRotateLabels properties thanks to these pull requests.

Pull Requests?

I'd love them!

Comments?

Let's hear them! (The nice ones please!)

Me?

In case you're interested I'm @samjarman

Using DogeKit?

Simply submit a pull request editing this ReadMe. Or tweet me.

Apps using DogeKit:

Who will be first?

Doge

dogekit's People

Contributors

samjarman avatar rweichler avatar bryant1410 avatar

Stargazers

HKJeffer avatar Daniel Schemp avatar Harsha Balachandran avatar James Campbell avatar Tim Oliver avatar Roc Yu avatar Thomas Vagning avatar Jonathan avatar Owais Tauqir avatar Jaden Geller avatar Angus H. avatar Ralph avatar Mark Hall avatar Ed Wellbrook avatar Tiago Henriques avatar Marcel Voss avatar Adam Bell avatar Ivy Knight avatar Hardik Amal avatar  avatar Sasha B avatar Chris Maddern avatar Indy Griffiths avatar Ayman Farhat avatar Moshe avatar Peter Campanelli avatar Playr Inc avatar kk avatar zernie avatar Dogan Kaya Berktas avatar Saravanan avatar Erhan Bayraktar avatar Boris Bügling avatar Werner Ramaekers avatar Hugo Tunius avatar Julien Grimault avatar Eric Gallager avatar Oliver Clark Rickard avatar Flávio Caetano avatar  avatar Luis Ascorbe avatar  avatar Marin avatar  avatar Daniel Miedema avatar Kevin Alcock avatar J-P Teti avatar Christian A. Strømmen avatar David Olesch avatar Billy Tobon avatar Pin Shih Wang avatar Jamie Stobbs avatar Jevin Sweval avatar Pavel Dusatko avatar Alexander Gee avatar Cameron Jackson avatar Sam Silverman avatar Johnnie Pittman avatar Jonas Gessner avatar Lars Anderson avatar Richard avatar Michael Ochs avatar  avatar Neil Kimmett avatar Emily Brenneke avatar Denys Telezhkin avatar Thomas Ricouard avatar Diego Acosta avatar Gosha Spark avatar Berkus Decker avatar

Watchers

mayulu avatar James Cloos avatar  avatar

dogekit's Issues

Add a maximumNumberOfThings property

It'd be nice as an addition for DogeKit to trigger stop automatically when a certain number of labels are reached, exposing such number as a maximumNumberOfThings property.

Methods need to be in doge syntax

Method's should be in correct doge syntax like so:

- (void)wowDoge:(id)doge
                                        suchString:(NSString *)veryString
                    muchError:(NSError *)wow;

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.