|
|
@@ -17,13 +17,28 @@ @implementation MJRefreshAutoNormalFooter
|
|
|
- (UIActivityIndicatorView *)loadingView
|
|
|
{
|
|
|
if (!_loadingView) {
|
|
|
- UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
|
|
|
+ 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 makr - 重写父类的方法
|
|
|
+- (void)prepare
|
|
|
+{
|
|
|
+ [super prepare];
|
|
|
+
|
|
|
+ self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
|
|
|
+}
|
|
|
+
|
|
|
- (void)placeSubviews
|
|
|
{
|
|
|
[super placeSubviews];
|