diff --git a/MBFingerTipWindow.h b/MBFingerTipWindow.h index e52ce4b..af4770b 100644 --- a/MBFingerTipWindow.h +++ b/MBFingerTipWindow.h @@ -26,7 +26,7 @@ /** If using the default touchImage, the color with whicih to fill the shape. Defaults to white. */ @property (nonatomic, strong) UIColor *fillColor; -/** Sets whether fingertips should always show regardless of whether we're mirroring. Defaults to NO */ -@property (nonatomic) BOOL alwaysShowFingerTip; +/** Sets whether touches should always show regardless of whether the display is mirroring. Defaults to NO. */ +@property (nonatomic, assign) BOOL alwaysShowTouches; @end diff --git a/MBFingerTipWindow.m b/MBFingerTipWindow.m index 0c50471..d3bd927 100644 --- a/MBFingerTipWindow.m +++ b/MBFingerTipWindow.m @@ -154,12 +154,13 @@ - (UIImage *)touchImage #pragma mark - Setter -- (void)setAlwaysShowFingerTip:(BOOL)alwaysShowFingerTip +- (void)setAlwaysShowTouches:(BOOL)flag { - if (_alwaysShowFingerTip != alwaysShowFingerTip) + if (_alwaysShowTouches != flag) { - _alwaysShowFingerTip = alwaysShowFingerTip; - [self updateFingertipsAreActive]; + _alwaysShowTouches = flag; + + [self updateFingertipsAreActive]; } } @@ -192,10 +193,14 @@ - (BOOL)anyScreenIsMirrored - (void)updateFingertipsAreActive; { - if (self.alwaysShowFingerTip || ([[[[NSProcessInfo processInfo] environment] objectForKey:@"DEBUG_FINGERTIP_WINDOW"] boolValue])) + if (self.alwaysShowTouches || ([[[[NSProcessInfo processInfo] environment] objectForKey:@"DEBUG_FINGERTIP_WINDOW"] boolValue])) + { self.active = YES; + } else + { self.active = [self anyScreenIsMirrored]; + } } #pragma mark -