Skip to content

A simple iOS library which shows your fingers on the screen, helps with demo's and presentations so people actually have a clue where you are tapping.

License

Notifications You must be signed in to change notification settings

M0rph3v5/Vinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vinger

A simple iOS library which shows your fingers on the screen, helps with demo's and presentations so people actually have a clue where you are tapping.

All you have to do is import Vinger and replace your window with the class from this library like so:

import Vinger

window = TouchWindow()
window?.rootViewController = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()

Unfortunately as is this is the only way to have a custom class on your window and thus you need to re set the rootViewController. Make sure to check if your storyboard is named "Main" or something different.

Customization

When you run the project you should see black representations right under your fingers on the screen, to customize this view all you need to do is create a subclass of TouchView and do your custom rendering in the drawrect. Or add imageviews / whatever you want to show :)

public class DoubleCircleTouchView: TouchView {

  override init(frame: CGRect) {
    super.init(frame: CGRect(x: 0, y: 0, width: 60, height: 60))
  }

  public override func remove() {
    
    UIView.animateWithDuration(0.6, animations: { () -> Void in
      self.alpha = 0
      self.transform = CGAffineTransformMakeScale(1.5, 1.5)
      }) { (success) -> Void in
      self.removeFromSuperview()
    }
  }
}

Override the remove method to for example animate your view away instead of having it removed instantly.

Once you have this class all you need to do is set it on the TouchWindow class like this:

window.touchViewClass = DoubleCircleTouchView.self

Be gone questions like 'wait where did you tap just now?' \o/

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate Vinger into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Vinger'

Then, run the following command:

$ pod install

About

A simple iOS library which shows your fingers on the screen, helps with demo's and presentations so people actually have a clue where you are tapping.

Resources

License

Stars

Watchers

Forks

Packages

No packages published