TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Dec 2016 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Benjamin Herzog.
This framework provides an UIWindow subclass that highlights every touch. It can be used to create better video presentations of your app.
The idea of this project is heavily inspired by https://github.com/eumlab/EUMTouchPointView
To run the example project, clone the repo and open the workspace in the Example directory.
TouchPresenter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'TouchPresenter'
In the project, you need to import the framework:
import TouchPresenter
To use the window, just override the init method in your AppDelegate.swift and configure it like you want:
override init() {
let config = TouchPresenterConfiguration(viewType: TPLightBlueCircleIndicator.self, enable3DTouch: true)
window = TPWindow(frame: UIScreen.mainScreen().bounds, configuration: config)
super.init()
}
If you are already using a custom window be sure to make it a subclass of TPWindow and call it’s initializer as super in your initializer:
class MyCustomWindow: TPWindow { ... }
It is also possible to use different indicators, there are three kinds provided currently by the framework which is TPLightBlueCircleIndicator, TPRedIndicator and TPCircleIndicator. If you want to use a custom one, just return the type of your custom view, the only requirement is, that it inherits from UIView. (See example project for an example of this)
You can also specify a configuration block in the configuration object. That will be called after initialising the view, so you could just use a plain UIImageView like in the example project:
let config = TouchPresenterConfiguration(viewType: UIImageView.self, enable3DTouch: true) {
$0.image = UIImage(named: "oval")
}
window = TPWindow(frame: UIScreen.mainScreen().bounds, configuration: config)
Benjamin Herzog, mail@benchr.de
TouchPresenter is available under the MIT license. See the LICENSE file for more info.