Kaynağa Gözat

1.修改iOS UIScrollView EmptyView显示与隐藏。

Pen Li 7 yıl önce
ebeveyn
işleme
e02778b2da

+ 5 - 1
common/EmptyView/RAEmptyView.m

@@ -49,7 +49,11 @@
 - (UILabel *)tipLabel {
     if (!_tipLabel) {
         _tipLabel = [[UILabel alloc] init];
-        _tipLabel.text = NSLocalizedString(@"empty_tips", nil);
+        NSString *tips = NSLocalizedString(@"empty_tips", nil);
+        if ([tips isEqualToString:@"empty_tips"]) {
+            tips = @"Reload";
+        }
+        _tipLabel.text = tips;
         _tipLabel.numberOfLines = 0;
         _tipLabel.textAlignment = NSTextAlignmentCenter;
     }

+ 2 - 1
common/UIScrollVIew+Empty/UIScrollView+Empty.m

@@ -58,7 +58,7 @@ static const float duration = 0.25;
     UIView *view = [self emptyContentView];
 //    view.alpha = 0.0f;
     view.hidden = NO;
-    
+    [self bringSubviewToFront:view];
 //    [UIView animateWithDuration:duration animations:^{
 //        view.alpha = 1.0f;
 //    }];
@@ -71,6 +71,7 @@ static const float duration = 0.25;
 //    } completion:^(BOOL finished) {
         view.hidden = YES;
 //    }];
+    [self sendSubviewToBack:view];
 }
 
 @end