Skip to content

Commit

Permalink
API cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
incanus committed Mar 10, 2015
1 parent 263de60 commit 6cec838
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions MBFingerTipWindow.h
Expand Up @@ -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
15 changes: 10 additions & 5 deletions MBFingerTipWindow.m
Expand Up @@ -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];
}
}

Expand Down Expand Up @@ -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 -
Expand Down

0 comments on commit 6cec838

Please sign in to comment.