TouchCheck
TouchCheck shows debug overlays on buttons and interactive views based on a typical finger size - it'll show green or red depending on if the view is big enough and avoids clashes with other touch areas. It works on all views, even if deeply nested within a view controller.
Installation
Cocoapods
- Step 1: Add
pod 'TouchCheck', '~> 0.0.1'
to your Podfile and runpod update
in Terminal. - Step 2: Add the one required line, as seen in usage!
Manual
- Step 1: Drop
TouchCheck.swift
into your project or copy the contents of it where ever you like.
Usage
Super simple to get started, just add the following line within didFinishLaunchingWithOptions
:
TouchCheck.configure(enabled: .always)
How it works
It (when explicitly enabled) swizzles viewDidAppear to find, check and overlay debug views on all buttons or inputs (subclasses or any view with an implementation of UIControl), in addition to any view which has one gesture recognizer.
In future, this detection will evolve and be smarter.
Author
Ross Beale, @rossbeale
Credits
Thanks to @kdzwinel for the idea!
License
TouchCheck is available under the MIT license. See the LICENSE file for more info.