Merge pull request #9 from ReneLindhorst/master

Flag to disable the morphing of a stationary view spot
This commit is contained in:
Joe Blau 2014-06-16 06:52:23 -07:00
commit e4bd488add
2 changed files with 8 additions and 2 deletions

2
Classes/COSTouchVisualizerWindow.h Normal file → Executable file
View File

@ -23,4 +23,6 @@
@property (nonatomic, strong) UIColor *rippleStrokeColor;
@property (nonatomic, strong) UIColor *rippleFillColor;
@property (nonatomic) BOOL stationaryMorphEnabled; // default: YES
@end

8
Classes/COSTouchVisualizerWindow.m Normal file → Executable file
View File

@ -93,7 +93,9 @@
self.rippleAlpha = 0.2;
self.rippleFadeDuration = 0.2;
self.stationaryMorphEnabled = YES;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(screenConnect:)
name:UIScreenDidConnectNotification
@ -239,7 +241,9 @@
touchView = [[COSTouchSpotView alloc] initWithImage:self.touchImage];
[self.overlayWindow.rootViewController.view addSubview:touchView];
self.timer = [NSTimer scheduledTimerWithTimeInterval:0.6 target:self selector:@selector(performMorph:) userInfo:touchView repeats:YES];
if (self.stationaryMorphEnabled) {
self.timer = [NSTimer scheduledTimerWithTimeInterval:0.6 target:self selector:@selector(performMorph:) userInfo:touchView repeats:YES];
}
}
if (![touchView isFadingOut]) {