From e585affc2c2dbe459071c0d4ae8f923d285f3a3a Mon Sep 17 00:00:00 2001 From: rain_home Date: Thu, 10 Sep 2015 22:21:11 +0900 Subject: [PATCH] minor refine minor refine --- Example/TouchID/AppDelegate.m | 11 ++++++++--- SmileAuth/Classes/SmileAuthenticator.h | 3 ++- SmileAuth/Classes/SmileAuthenticator.m | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Example/TouchID/AppDelegate.m b/Example/TouchID/AppDelegate.m index 02341a4..79e8fba 100644 --- a/Example/TouchID/AppDelegate.m +++ b/Example/TouchID/AppDelegate.m @@ -65,9 +65,14 @@ -(void)showCoverImageView{ } -(void)hideCoverImageView{ - [UIView animateWithDuration:0.2 animations:^{ - _coverImageView.alpha = 0.0; - }]; + if (_coverImageView) { + [UIView animateWithDuration:0.2 animations:^{ + _coverImageView.alpha = 0.0; + } completion:^(BOOL finished) { + [_coverImageView removeFromSuperview]; + _coverImageView = nil; + }]; + } } - (void)applicationWillResignActive:(UIApplication *)application { diff --git a/SmileAuth/Classes/SmileAuthenticator.h b/SmileAuth/Classes/SmileAuthenticator.h index d41c7c6..5d03261 100644 --- a/SmileAuth/Classes/SmileAuthenticator.h +++ b/SmileAuth/Classes/SmileAuthenticator.h @@ -40,7 +40,8 @@ typedef NS_ENUM(int, SecurityType) { @property (nonatomic, copy) NSString * localizedReason; @property (nonatomic, strong) SmileKeychainWrapper *keychainWrapper; @property (nonatomic, assign) SecurityType securityType; -@property (nonatomic, assign) BOOL isShowingAuthVC; +/*!@brief This property show whether the Auth view is showing or not.*/ +@property (nonatomic, readonly) BOOL isShowingAuthVC; @property (nonatomic, strong) UIViewController *rootVC; @property (nonatomic, weak) id delegate; /*!@brief For customization, use this property to customize tint color. The default color is pink.*/ diff --git a/SmileAuth/Classes/SmileAuthenticator.m b/SmileAuth/Classes/SmileAuthenticator.m index cf66fa6..1093382 100644 --- a/SmileAuth/Classes/SmileAuthenticator.m +++ b/SmileAuth/Classes/SmileAuthenticator.m @@ -20,6 +20,7 @@ @interface SmileAuthenticator() @property (nonatomic, assign) LAPolicy policy; @property (nonatomic, strong) LAContext * context; +@property (nonatomic, readwrite) BOOL isShowingAuthVC; @end