浏览代码

fix compatibility ios 9

Marino Faggiana 7 年之前
父节点
当前提交
1cf3a79fd2
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      iOSClient/Main/CCMain.m

+ 7 - 2
iOSClient/Main/CCMain.m

@@ -513,8 +513,13 @@
 - (void)createRefreshControl
 {
     _refreshControl = [UIRefreshControl new];
-    _tableView.refreshControl = _refreshControl;
-   
+    
+    if (@available(iOS 10, *)) {
+        _tableView.refreshControl = _refreshControl;
+    } else {
+        [_tableView addSubview:_refreshControl];
+    }
+       
     _refreshControl.tintColor = [NCBrandColor sharedInstance].brandElement;
     _refreshControl.backgroundColor = [NCBrandColor sharedInstance].brand;