Browse Source

解决接受多个离线,打开页面消息不能自动滚动到最底部问题

zwp 5 tháng trước cách đây
mục cha
commit
70c8b38925
1 tập tin đã thay đổi với 8 bổ sung2 xóa
  1. 8 2
      AIIM/Controller/chat/ChatController.m

+ 8 - 2
AIIM/Controller/chat/ChatController.m

@@ -99,7 +99,7 @@ static const CGFloat kQuoteViewHeight = 46.0f;
 @property (nonatomic, assign) BOOL isBatchMode;
 
 @property (nonatomic, assign) BOOL showLoading;
-
+@property (nonatomic, assign) BOOL isInit;
 
 
 @end
@@ -119,6 +119,7 @@ static const CGFloat kQuoteViewHeight = 46.0f;
     self._tableView.delegate=self;
     self._tableView.dataSource = self;
     _isfriend=true;
+    _isInit = YES;
     
     CGFloat safeBottom = [UIDevice safeDistanceBottom];
     UIView *temp = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 60+safeBottom)];
@@ -658,7 +659,12 @@ static const CGFloat kQuoteViewHeight = 46.0f;
         _showLoading = true;
     }
 
-    
+    if (_isInit) {
+        _isInit = NO;
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [self movetoBotton];
+        });
+    }
 }
 
 -(void)movetoBotton{