From 83b9d5c682b21d88133f24da0f94dd56bd79e687 Mon Sep 17 00:00:00 2001
From: 单军华
Date: Thu, 19 Jul 2018 13:38:55 +0800
Subject: [PATCH] change
---
screendisplay/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m | 69 ++++++++++++++++++++++++++++++++++
1 files changed, 69 insertions(+), 0 deletions(-)
diff --git a/screendisplay/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m b/screendisplay/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m
new file mode 100755
index 0000000..dae9060
--- /dev/null
+++ b/screendisplay/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m
@@ -0,0 +1,69 @@
+//
+// MJRefreshAutoNormalFooter.m
+// MJRefreshExample
+//
+// Created by MJ Lee on 15/4/24.
+// Copyright (c) 2015��� ���������. All rights reserved.
+//
+
+#import "MJRefreshAutoNormalFooter.h"
+
+@interface MJRefreshAutoNormalFooter()
+@property (weak, nonatomic) UIActivityIndicatorView *loadingView;
+@end
+
+@implementation MJRefreshAutoNormalFooter
+#pragma mark - ������������������
+- (UIActivityIndicatorView *)loadingView
+{
+ if (!_loadingView) {
+ UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:self.activityIndicatorViewStyle];
+ loadingView.hidesWhenStopped = YES;
+ [self addSubview:_loadingView = loadingView];
+ }
+ return _loadingView;
+}
+
+- (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle
+{
+ _activityIndicatorViewStyle = activityIndicatorViewStyle;
+
+ self.loadingView = nil;
+ [self setNeedsLayout];
+}
+#pragma mark - ���������������������
+- (void)prepare
+{
+ [super prepare];
+
+ self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
+}
+
+- (void)placeSubviews
+{
+ [super placeSubviews];
+
+ if (self.loadingView.constraints.count) return;
+
+ // ������
+ CGFloat loadingCenterX = self.mj_w * 0.5;
+ if (!self.isRefreshingTitleHidden) {
+ loadingCenterX -= self.stateLabel.mj_textWith * 0.5 + self.labelLeftInset;
+ }
+ CGFloat loadingCenterY = self.mj_h * 0.5;
+ self.loadingView.center = CGPointMake(loadingCenterX, loadingCenterY);
+}
+
+- (void)setState:(MJRefreshState)state
+{
+ MJRefreshCheckState
+
+ // ���������������������
+ if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) {
+ [self.loadingView stopAnimating];
+ } else if (state == MJRefreshStateRefreshing) {
+ [self.loadingView startAnimating];
+ }
+}
+
+@end
--
Gitblit v1.8.0