Coder Social home page Coder Social logo

airingursb / fingertips Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mapbox/fingertips

0.0 2.0 0.0 3.23 MB

Touch indicators on external displays for iOS applications.

License: BSD 3-Clause "New" or "Revised" License

Objective-C 95.00% Ruby 5.00%

fingertips's Introduction

Fingertips

FOSSA Status

Presentation mode for your iOS app

Fingertips is a small library (one class) meant for presentations from iOS devices that shows all touches and gestures so that the audience can see them.

This is only designed for the iPad 2 and iPhone 4S (or later), which feature hardware video mirroring support. This library does not do the mirroring for you!

Just drop in our replacement UIWindow subclass and your app will automatically determine when an external screen is available. It will show every touch on-screen with a nice partially-transparent graphic that automatically fades out when the touch ends.

If you are using storyboards, the easiest way to integrate Fingertips is to override the window method of your application delegate like this:

// AppDelegate.m

- (UIWindow *)window {
	if (!_window) {
		_window = [[MBFingerTipWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
	}
	return _window;
}
// AppDelegate.swift (Swift 2)

var window: UIWindow? = MBFingerTipWindow(frame: UIScreen.mainScreen().bounds)
// AppDelegate.swift (Swift 3)

var window: UIWindow? = MBFingerTipWindow(frame: UIScreen.main.bounds)

Fingertips requires iOS 5.0 or greater and ARC. It uses no private API and is safe for App Store submissions.

Configuration

You shouldn't need to configure anything, but if you want to tweak some knobs:

  • touchImage: pass a UIImage to use for showing touches
  • touchAlpha: change the visible-touch alpha transparency
  • fadeDuration: change how long lifted touches fade out
  • strokeColor: change default touchImage stroke color (defaults to black)
  • fillColor: change default touchImage fill color (defaults to white)

If you ever need to debug Fingertips, just set the DEBUG_FINGERTIP_WINDOW environment variable to YES in Xcode or set the runtime property alwaysShowTouches to YES.

License

Copyright (c) 2011-2017 Mapbox, Inc.

The Fingertips library should be accompanied by a LICENSE file. This file contains the license relevant to this distribution. If no license exists, please contact Mapbox.

FOSSA Status

fingertips's People

Contributors

incanus avatar correia avatar 1ec5 avatar 0xced avatar datalogics-kam avatar mdiep avatar airingursb avatar junjie avatar defagos avatar fossabot avatar

Watchers

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