mirror of
https://github.com/joeblau/COSTouchVisualizer.git
synced 2024-09-11 12:36:58 +03:00
Visualize touches, gestures and long presses on your iPhone or iPad
Classes | ||
Example | ||
.gitignore | ||
CHANGELOG.md | ||
COSTouchVisualizer.podspec | ||
LICENSE | ||
Rakefile | ||
README.md | ||
screenshot-drag.png | ||
screenshot-press.png | ||
touchvisdemo.gif |
COSTouchVisualizer
Usage
To run the example project; clone the repo, and run pod install
from the Example directory first.
With Storyboards
in your AppDelegate
implementation simply add the following getter
#import <COSTouchVisualizerWindow.h>
...
// Add this method to your AppDelegate method
- (COSTouchVisualizerWindow *)window
{
static COSTouchVisualizerWindow *customWindow = nil;
if (!customWindow) customWindow = [[COSTouchVisualizerWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
return customWindow;
}
Without Storyboards
#import <COSTouchVisualizerWindow.h>
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Setup window
self.window = [[COSTouchVisualizerWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
...
}
Customization
// Add these lines after the windows is initialized
[customWindow setFillColor:[UIColor yellowColor]];
[customWindow setStrokeColor:[UIColor purpleColor]];
[customWindow setTouchAlpha:0.4];
Requirements
Installation
COSTouchVisualizer is available through CocoaPods, to install it simply add the following line to your Podfile:
pod "COSTouchVisualizer"
Author
Joe Blau, josephblau@gmail.com
License
COSTouchVisualizer is available under the MIT license. See the LICENSE file for more info.