From 4234b2544c7403501bc1edc47f56343862480ac6 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 7 Aug 2015 22:27:17 +0800 Subject: [PATCH] fix the indicatorRadius size --- RefreshControl/Views/XHPinterestRefreshView.m | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/RefreshControl/Views/XHPinterestRefreshView.m b/RefreshControl/Views/XHPinterestRefreshView.m index cbb388b..4037ad8 100644 --- a/RefreshControl/Views/XHPinterestRefreshView.m +++ b/RefreshControl/Views/XHPinterestRefreshView.m @@ -30,11 +30,12 @@ - (instancetype)initWithFrame:(CGRect)frame { } - (void)willStartRefreshing { - [self.activityIndicatorView startAnimating]; - [UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ + [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseInOut|UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionBeginFromCurrentState animations:^{ self.circularProgressView.alpha = 0.0; + self.activityIndicatorView.alpha = 1.0; } completion:^(BOOL finished) { }]; + [self.activityIndicatorView startAnimating]; } - (void)didStartRefreshing { } @@ -45,12 +46,12 @@ - (void)refreing { } - (void)willEndRefreshing { - [self.activityIndicatorView stopAnimating]; - [UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ + [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseInOut|UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionBeginFromCurrentState animations:^{ self.circularProgressView.alpha = 1.0; - + self.activityIndicatorView.alpha = 0.0; } completion:^(BOOL finished) { }]; + [self.activityIndicatorView stopAnimating]; } - (void)didEndRefresing { } @@ -70,8 +71,8 @@ - (void)setPullDownOffset:(CGFloat)pullDownOffset { - (XHActivityIndicatorView *)activityIndicatorView { if (!_activityIndicatorView) { _activityIndicatorView = [[XHActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)]; - _activityIndicatorView.hidesWhenStopped = YES; - _activityIndicatorView.color = [UIColor redColor]; + _activityIndicatorView.color = [UIColor colorWithRed:228/255.0 green:27 / 255.0 blue:70/255.0 alpha:1.000]; + _activityIndicatorView.indicatorRadius = 6; _activityIndicatorView.center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); } return _activityIndicatorView;