Skip to content
Lightweight touch visualization library in Swift. A single line of code and visualize your touches!
Branch: master
Clone or download
morizotter Merge pull request #99 from bre7/patch-1
Added swift_version flag
Latest commit 7abc28e Jan 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
TouchVisualizer.xcodeproj Merge branch 'master' into swift4.2 Oct 3, 2018
TouchVisualizer change syntax to swift 4.2 where needed Oct 1, 2018
.gitignore adding .lock file back into version control May 2, 2015
Gemfile.lock Update podspec May 6, 2018
LICENSE Mimimum target OS version to 9.0 Mar 17, 2018
TouchVisualizer.podspec Added swift_version flag Jan 16, 2019


Version License Platform Carthage compatible Circle CI Join the chat at

TouchVisualizer is a lightweight pure Swift implementation for visualising touches on the screen.


  • Works with just a single line of code!
  • Supports multiple fingers.
  • Supports multiple UIWindow's.
  • Displays touch radius (finger size).
  • Displays touch duration.
  • Customise the finger-points image and colour.
  • Supports iPhone and iPad in both portrait and landscape mode.

How it looks







In-app implementation:


It's fun!

Runtime Requirements

  • Swift 4.0
  • Xcode 9.2
  • iOS9.0 or later

TouchVisualizer works with Swift 3 from version 3.0.0.

Installation and Setup

Note: Embedded frameworks require a minimum deployment target of iOS 9.0.

Information: To use TouchVisualizer with a project targeting iOS 8.0 or lower, you must include the TouchVisualizer.swift source file directly in your project.

Installing with CocoaPods

CocoaPods is a centralised dependency manager that automates the process of adding libraries to your Cocoa application. You can install it with the following command:

$ gem update
$ gem install cocoapods
$ pods --version

To integrate TouchVisualizer into your Xcode project using CocoaPods, specify it in your Podfile and run pod install.

platform :ios, '8.0'
pod "TouchVisualizer", '~>3.0.0'

Installing with Carthage

Carthage is a decentralised dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate TouchVisualizer into your Xcode project using Carthage, specify it in your Cartfile:

github "morizotter/TouchVisualizer" "3.0.0"

Manual Installation

To install TouchVisualizer without a dependency manager, please add all of the files in /Pod to your Xcode Project.


To start using TouchVisualizer, write the following line wherever you want to start visualising:

import TouchVisualizer

Then invoke visualisation, by calling:


and stop the presentation like this:


Get touch locations by this:


It is really simple, isn't it?


TouchVisualizer also has the ability to customize your touch events. Here is an example of what can be customized:

var config = Configuration()
config.color = UIColor.redColor()
config.image = UIImage(named: "YOUR-IMAGE")
config.showsTimer = true
config.showsTouchRadius = true
config.showsLog = true

Configuration properties

name type description default
color UIColor Color of touch point and text. default color
image UIImage Touch point image. If rendering mode is set to UIImageRenderingModeAlwaysTemplate, the image is filled with color above. circle image
defaultSize CGSize Default size of touch point. 60 x 60px
showsTimer Bool Shows touch duration. false
showsTouchRadius Bool Shows touch radius by scaling touch point. It doesn't work on simulator. false
showsLog Bool Shows log. false





Please file issues or submit pull requests for anything you’d like to see! We're waiting! :)


TouchVisualizer is released under the MIT license. Go read the LICENSE file for more information.


There is a similar touch visualization library called COSTouchVisualizer, which is written in Objective-C. COSTouchVisualizer supports earlier versions of iOS and is more mature. If TouchVisualizer isn't enough for you, try that!

You can’t perform that action at this time.