marinofaggiana 5 年之前
父节点
当前提交
0767e44a40
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      iOSClient/Main/CCMain.m

+ 6 - 4
iOSClient/Main/CCMain.m

@@ -151,10 +151,12 @@
     
     
     // Load Rich Workspace
     // Load Rich Workspace
     self.viewRichWorkspace = [[[NSBundle mainBundle] loadNibNamed:@"NCRichWorkspace" owner:self options:nil] firstObject];
     self.viewRichWorkspace = [[[NSBundle mainBundle] loadNibNamed:@"NCRichWorkspace" owner:self options:nil] firstObject];
-    UITapGestureRecognizer *viewRichWorkspaceTapped = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(viewRichWorkspaceTapAction:)];
-    viewRichWorkspaceTapped.numberOfTapsRequired = 1;
-    viewRichWorkspaceTapped.delegate = self;
-    [self.viewRichWorkspace addGestureRecognizer:viewRichWorkspaceTapped];
+    if (@available(iOS 11, *)) {
+        UITapGestureRecognizer *viewRichWorkspaceTapped = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(viewRichWorkspaceTapAction:)];
+        viewRichWorkspaceTapped.numberOfTapsRequired = 1;
+        viewRichWorkspaceTapped.delegate = self;
+        [self.viewRichWorkspace addGestureRecognizer:viewRichWorkspaceTapped];
+    }
     heightRichWorkspace = UIScreen.mainScreen.bounds.size.height/4 + heightSearchBar;
     heightRichWorkspace = UIScreen.mainScreen.bounds.size.height/4 + heightSearchBar;
     self.viewRichWorkspace.textViewTopConstraint.constant = heightSearchBar;
     self.viewRichWorkspace.textViewTopConstraint.constant = heightSearchBar;
     [self.viewRichWorkspace setFrame:CGRectMake(0, 0, self.tableView.frame.size.width, heightRichWorkspace)];
     [self.viewRichWorkspace setFrame:CGRectMake(0, 0, self.tableView.frame.size.width, heightRichWorkspace)];