The easiest way to show off your iOS taps and gestures for demos and videos.

Overview

Version License Platform Awesome

It's ShowTime 🎥

ShowTime is the simplest and best way to display all your taps and gestures on screen. Perfect for that demo, presentation or video.

One file (or pod install) is all you need to add that extra polish your demos. ShowTime even displays the level of force you're applying, and can be configured to show the actual number of taps performed. Apple Pencil events are configurable and disabled by default.

ShowTime works as soon as your app runs with no setup required, but is also highly configurable if you don't like the defaults.

ShowTime works with single- and multi-window setups, as well as in iOS widgets, and works with any Swift or Objective-C project.

Check out How it works.

It takes less than a minute to install ShowTime, consider using it when you're sharing or recording your screen through QuickTime or AirPlay.

By default, the size of the visual touches are 44pt; this mirrors Apple's guidelines for minimum hit size for buttons on iOS. You're free to change this, of course!

Showing your gestures during demos gives your audience a much clearer context on what's happening on your device. Try ShowTime for your next demo, it's insanely easy to set up!

ADDED BONUS: Adding ShowTime as a pod to your app in debug mode will show taps and gestures in your XCUI automation tests while the tests run!

ShowTime

Installation

Swift Package Manager

  • Step 1: In Xcode 11+, add https://github.com/KaneCheshire/ShowTime.git to the list of Swift Package dependencies, see here for more information.
  • Step 2: There is no step 2, ShowTime works as soon as you launch your app, but you can configure it if you wish!

Cocoapods

  • Step 1: Add pod 'ShowTime' to your Podfile and run pod update in Terminal.
  • Step 2: There is no step 2, ShowTime works as soon as you launch your app, but you can configure it if you wish!

Manual

  • Step 1: Drop ShowTime.swift into your project or copy the contents of it where ever you like.

Usage

ShowTime works out of the box (you don't even need to import the framework anywhere), but you can customise it to turn it on or off, change the colour of the taps, and even choose whether to display the number of taps for multiple taps.

There's lots of options to play with which helps ShowTime work with your app's character during demos.

Here's a list of options:

// Defines when and if ShowTime is enabled.
//
// Possible values are:
// - .always
// - .never
// - .debugOnly
//
// `.always` by default,
ShowTime.enabled: ShowTime.Enabled


// The fill (background) color of a visual touch.
// When set to `.auto`, ShowTime automatically uses the stroke color with a 50% alpha.
// This makes it super quick to change ShowTime to fit in better with your brand.
// `.auto` by default.
ShowTime.fillColor: UIColor

// The colour of the stroke (outline) of a visual touch.
// "Twitter blue" by default.
ShowTime.strokeColor: UIColor

// The width (thickness) of the stroke around a visual touch.
// 3pt by default.
ShowTime.strokeWidth: CGFloat

// The size of a visual touch.
// 44x44pt by default.
ShowTime.size: CGSize

// The style of animation  to use when a visual touch disappears.
//
// Possible values are:
// - .standard (Slightly scaled down and faded out)
// - .scaleDown (Completely scaled down with no fade)
// - .scaleUp (Scaled up and faded out)
// - .custom (Provide your own custom animation block)
//
// `.standard` by default.
ShowTime.disappearAnimation: ShowTime.Animation

// The delay, in seconds, before the visual touch disappears after a touch ends.
// `0.2` by default.
ShowTime.disappearDelay: TimeInterval

// Whether visual touches should indicate a multiple tap (i.e. show a number 2 for a double tap).
// `false` by default.
ShowTime.shouldShowMultipleTapCount: Bool

// The colour of the text to use when showing multiple tap counts.
// `.black` by default.
ShowTime.multipleTapCountTextColor: UIColor

// The font of the text to use when showing multiple tap counts.
// `.systemFont(ofSize: 17, weight: .bold)` by default.
ShowTime.multipleTapCountTextFont: UIFont

// Whether visual touches should visually show how much force is applied.
// `true` by default (show off that amazing tech!).
ShowTime.shouldShowForce: Bool

// Whether touch events from Apple Pencil are ignored.
// `true` by default.
ShowTime.shouldIgnoreApplePencilEvents: Bool

How it works

ShowTime is a one-size-fits-all solution to showing your taps and gestures while showing off your hard work in demos and videos. ShowTime works with both conventional single-window apps, as well as multi-window apps.

To achieve this, ShowTime uses method swizzling. Method swizzling is only possible with the Objective-C runtime, so will only work with Swift types that inherit from NSObject. That's okay, because UIWindow does inherit from NSObject, so ShowTime can swizzle the sendEvent(_:) method.

Swizzling is just a friendly term used for swapping out the default implementation of a method and replacing it with your own (which calls the default implementation, a bit like calling a super implementation of a class), so that you have more control over what happens with that method without having to subclass. The benefit – but also danger – of this is that all objects instantiated will use the new implementation, so swizzling should be used wisely and sparingly, especially in production code.

ShowTime swizzles the sendEvent(_:) method on UIWindow, intercepts the event and then lets UIWindow carry on with sending the event. By intercepting that event and extracting the UITouches out of it, ShowTime displays those touches visually on whatever window is receiving sendEvent(_:).

Useful info

Why don't I need to import ShowTime to get it to work?

ShowTime automatically swizzles functions which doesn't require the framework to be imported with import ShowTime, so after install the cocoapod, ShowTime is automagically enabled. The only time you'll need to import the framework is if you want to play around with the configuration.

Can I use this in production?

Yes, I've never seen any weird crashes but it's never been stress tested, so to do so is at your own risk.

Why would I want to show the number of multiple taps?

People watching a demo of your app don't know exactly what your fingers are doing, so showing how many times you've tapped on a specific part of the screen really helps people understand the gestures you're carrying out.

Double tapping makes sense if you're watching someone's hands, but often this can be easily missed if you're watching it on a screen. Showing the number of multiple taps by setting ShowTime.shouldShowMultipleTapCount to true shows a number inside the tap itself, clearly demonstrating to your audience that you just tapped twice (or more) in succession in the same place.

Why don't Apple Pencil events show by default?

I'm guessing that most of the time, if you're demoing using an Apple Pencil then you're demoing drawing or something similar, so you wouldn't want a touch to display at that location. You can easily disable this behaviour if you need touch events to show for Apple Pencil interactions.

Can I have a different colour tap per-screen rather than per-app?

This is possible, you'd just need to set the colour in viewDidLoad or viewDidAppear(_:) in the screens you want to change the colour of the taps on. It adds a small layer of complexity, but certainly possible.

Author

Kane Cheshire, @KaneCheshire

License

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

Comments
  • Fix exhaustive switch complain in XCode 11.4

    Fix exhaustive switch complain in XCode 11.4

    As of this project, there's no need for handling newly introduced region related cases. So, better to just ignore the newly introduced cases entirely.

    @available(iOS 13.4, *) case regionEntered = 5

    @available(iOS 13.4, *) case regionMoved = 6

    @available(iOS 13.4, *) case regionExited = 7

    opened by halonsoluis 12
  • Swift Compiler Error: Type 'UIFontWeight' (aka 'CGFloat') has no member 'bold'

    Swift Compiler Error: Type 'UIFontWeight' (aka 'CGFloat') has no member 'bold'

    This is compiling for iOS 9.0 as target, on Xcode 9.2. In a React Native (0.53) project. I installed manually by dropping ShowTime.swift into my project.

    Type 'UIFontWeight' (aka 'CGFloat') has no member 'bold'
    
    screenshot 2018-03-21 12 22 59

    Solution: https://stackoverflow.com/questions/31771679/uifont-how-to-get-system-thin-font

    I can compile by changing the line to end with weight: UIFontWeightBold. I don't do Swift development so I'm not going to say whether this is a correct fix for PR.

    opened by fungilation 7
  • 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.2 — please upgrade to at least 9.0

    'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.2 — please upgrade to at least 9.0

    This warning shows

    The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.2, but the range of supported deployment target versions is 9.0 to 14.4.99.

    Please upgrade, like https://github.com/wtw-software/UTMConversion/issues/12 did :)

    opened by stuffmc 6
  • Swift Package Manager

    Swift Package Manager

    • Added Package.swift with same minimum versions etc as pod spec

    I moved ShowTime.swift into Sources/ShowTime because SwiftPM doesn't like when it's at the top level of a repo with non-swift files. If needed I can move it to be in ./ShowTime or ./ShowTime/Classes, the Package.swift and podspec will just need to be updated to reflect that.

    opened by maxxfrazer 6
  • `Method Swizzling` on .never

    `Method Swizzling` on .never

    Hello, This is more of an observation from our team than a bug but

      public static var enabled: ShowTime.Enabled = .never {
        didSet {
          UIWindow.swizzle()
        }
      }
    

    essentially swizzles an event irrespective of .enabled value even if its never. Shouldn't UIWindow.swizzle() only on .debugOnly and .always?

    opened by 0x6d6e 2
  • Option to automatically set fill colour to 50% alpha of stroke colour

    Option to automatically set fill colour to 50% alpha of stroke colour

    I naturally use ShowTime a lot, but one thing I've found is setting it up with our project's colours is a bit tedious. We can make it 1 line of code easier by making it so that by default, ShowTime just uses the outline's colour for the fill color set to 50%.

    enhancement Looking into it 
    opened by KaneCheshire 1
  • Tests pass on iOS 14/Xcode 12

    Tests pass on iOS 14/Xcode 12

    GM is still expanding so this is actually running on the last beta but should be fine. There's some warnings from the PixelTest lib but that's not for this repo to fix.

    opened by KaneCheshire 0
  • "Reference to class property 'enabled' is not concurrency-safe because it involves shared mutable state" with Strict Concurrency Checking = Complete

    Hello,

    I tried enabling Complete Strict Concurrency Checking in Xcode 14.1 (in the Build Settings of my target) and a warning appeared on the line where I was setting ShowTime.enabled.

    In particular my code is:

    AppDelegate.swift

    func applicationDidBecomeActive(_ application: UIApplication) {
        ShowTime.enabled = ...
        ...
    }
    

    Please find a minimal sample project attached, it's entirely SwiftUI so no AppDelegate but the behavior is the same. ShowTimeTest.zip

    Thank you.

    opened by cderito 1
  • Disabled ShowTime should not slow down the app

    Disabled ShowTime should not slow down the app

    I use ShowTime in one app and i really like the visual user interactions. It is very helpful for demoing features and reporting bugs via screen recordings.

    The app detects if it runs on an internal test device or not (by looking for an installed other non public app which enables test mode even on release builds) and uses for non-test devices ShowTime.enabled = EnabledNever and i expected it would then use close to zero CPU time in this case.

    I run into performance issues with the app and analysed it with Instruments. I found ShowTime using more than 24% of all the app's CPU time even when disabled:

    284.00 ms 24.2% @objc UIWindow.swizzled_sendEvent(_:) ShowTime 283.00 ms 24.1% UlWindow.swizzled sendEvent(:) ShowTime

    image

    Can i fix this by myself?

    opened by MacMark 1
  • Where do I change the settings?

    Where do I change the settings?

    Thanks for this great tool @KaneCheshire !

    I am working on a react native project and pulled in ShowTime using CocoaPods. I would like to disable ShowTime by default and only enable it for recording videos. What I don't understand is: where do I change the settings/where does the config file (?) go? Maybe, I am the only one, but maybe it makes sense to add this info to the readme.

    Sorry for the n00b question!

    Thank you! Cheers Tim

    opened by otim 2
  • Feature Request: Automatic mode

    Feature Request: Automatic mode

    It would be awesome if there was a mode that automatically enabled ShowTime if there was an external screen connected or a screen recording started. It seems like you could do this via observing the following Notifications:

    UIScreen.didConnectNotification
    UIScreen.capturedDidChangeNotification
    
    opened by erichoracek 0
Owner
Kane Cheshire
Senior engineer in London and Hertfordshire. Working for Bumble and creator of MacID, Unlox and Ride.
Kane Cheshire
Special way to work with gestures in iOS

At a Glance Sensitive is a library that simplifies work with gestures in iOS. Forget about target/action pattern of primitive UIGestureRecognizer. Wit

Igor M. 550 Dec 29, 2022
Special way to work with gestures in iOS

At a Glance Sensitive is a library that simplifies work with gestures in iOS. Forget about target/action pattern of primitive UIGestureRecognizer. Wit

Igor M. 550 Dec 29, 2022
Best way to use UIGesture

NiceGesture The best way to use UIGesture #Usage ###TapGesture: because tapGesture is only have one state,so it's only have method whenTapped view.n

Zhuo 104 Sep 9, 2022
Drag and drop between your apps in split view mode on iOS 9

SplitViewDragAndDrop Easily add drag and drop to pass data between your apps Setup Add pod 'SplitViewDragAndDrop' to your Podfile or copy the "SplitVi

Mario Iannotta 324 Nov 22, 2022
Gesture recognizer tool [Swift / iOS]

DBPathRecognizer Demo Installation Simply add the file DBPathRecognizer.swift to your project Basic usage Start by creating a new DBPathRecognizer ins

Didier Brun 1.2k Dec 18, 2022
Peek and Pop with backwards-compatibility

PeekPop Peek and Pop is a great new iOS feature introduced with iPhone 6S and 6S+ that allows you to easily preview content using 3D touch. Sadly, alm

Roy Marmelstein 2k Dec 8, 2022
Switshot is a game media manager helps you transfer your game media from Nintendo Switch to your phone, and manage your media just few taps.

Switshot is a game media manager helps you transfer your game media from Nintendo Switch to your phone, and manage your media just few taps.

Astrian Zheng 55 Jun 28, 2022
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.

I've built out the Swift version of this library! Screenshots Description ABMediaView can display images, videos, as well as now GIFs and Audio! It su

Andrew Boryk 80 Dec 20, 2022
SwiftUI animation tutorials, all of demos are consisted of youtube videos at website of kavsoft

SwiftUI animation tutorials, all of demos are consisted of youtube videos at website of kavsoft

Yonggang Liu 194 Dec 29, 2022
Show off your GitHub contributions from your lock screen 📱

GitHubContributionsiOS V2 NOTICE: V2 is published. It is a complete rewrite using SwiftUI and Catalyst. Source code are now hosted on the version/2.x

JustZht 478 Dec 16, 2022
A better way to handle gestures on iOS

Tactile is a safer and more idiomatic way to respond to gestures and control events. It lets you catch bugs at compile time and write more expressive

Damien 714 Dec 29, 2022
Special way to work with gestures in iOS

At a Glance Sensitive is a library that simplifies work with gestures in iOS. Forget about target/action pattern of primitive UIGestureRecognizer. Wit

Igor M. 550 Dec 29, 2022
Special way to work with gestures in iOS

At a Glance Sensitive is a library that simplifies work with gestures in iOS. Forget about target/action pattern of primitive UIGestureRecognizer. Wit

Igor M. 550 Dec 29, 2022
Fastlane - 🚀 The easiest way to automate building and releasing your iOS and Android apps

fastlane is a tool for iOS and Android developers to automate tedious tasks like generating screenshots, dealing with provisioning profiles, and relea

fastlane 36.2k Jan 8, 2023
The easiest way to prepare, play, and remove sounds in your Swift app!

Chirp The easiest way to prepare, play, and remove sounds in your Swift app! ##Installation ###CocoaPods Installation Chirp is available on CocoaPods.

null 309 Dec 17, 2022
SwiftUIFontIcon The easiest way to implement font icons in your SwiftUI project.

SwiftUIFontIcon The easiest way to implement font icons in your SwiftUI project. Usage The library is super super easy to use, just something like thi

Bui Dac Huy 81 Dec 27, 2022
An app that will help UI/UX designers and iOS developpers to easily work together, using demos and examples about iOS capabilities, limitations, ecosystem, ...

Demoapp Work in progress... ?? What's about? It's an app built in SwiftUI that will help UI/UX designers and iOS developpers to work together smoothly

Kaww 2 Nov 2, 2022
ClassicPhotos is a TableView App demos how to optimize image download and filter with operation queue.

ClassicPhotos ClassicPhotos is a TableView App demos how to optimize image download and filter with operation queue. With Operation and Operation Queu

Kushal Shingote 2 Dec 18, 2021
30 days of React Native demos

30 Days of React Native 30 days of React Native examples/demos. This project is inspired by 100 Days of Swift (http://samvlu.com/) & 30DaysofSwift (ht

Wei Fang 6.6k Jan 8, 2023