Explorar o código

修复了,在设置header展示刷新文字的block后,第一次展示不会刷新文字的问题 (#1404)

kkkelicheng %!s(int64=4) %!d(string=hai) anos
pai
achega
fb2848deb8
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      MJRefresh/Custom/Header/MJRefreshStateHeader.m

+ 6 - 0
MJRefresh/Custom/Header/MJRefreshStateHeader.m

@@ -49,6 +49,12 @@
     return _lastUpdatedTimeLabel;
 }
 
+- (void)setLastUpdatedTimeText:(NSString * _Nonnull (^)(NSDate * _Nullable))lastUpdatedTimeText{
+    _lastUpdatedTimeText = lastUpdatedTimeText;
+    // 重新设置key(重新显示时间)
+    self.lastUpdatedTimeKey = self.lastUpdatedTimeKey;
+}
+
 #pragma mark - 公共方法
 - (instancetype)setTitle:(NSString *)title forState:(MJRefreshState)state
 {