mirror of
https://github.com/joeblau/COSTouchVisualizer.git
synced 2024-10-26 12:44:44 +03:00
added a flag to disable the morphing of a stationary view spot
This commit is contained in:
parent
d30dcaad07
commit
381f360a9e
2
Classes/COSTouchVisualizerWindow.h
Normal file → Executable file
2
Classes/COSTouchVisualizerWindow.h
Normal file → Executable 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
8
Classes/COSTouchVisualizerWindow.m
Normal file → Executable 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]) {
|
||||
|
Loading…
Reference in New Issue
Block a user