CYWebAddPointVC.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. //
  2. // CYWebVeniceVC.h
  3. // shiku_im
  4. //
  5. //
  6. //
  7. //
  8. #import "XMGMyBaseVC.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface CYWebAddPointVC : XMGMyBaseVC
  11. @property (nonatomic ,copy) NSString * name;
  12. @property (nonatomic ,copy) NSString * strURL;
  13. @property (nonatomic,weak) UILabel *countTipL;
  14. @end
  15. NS_ASSUME_NONNULL_END
  16. // _timeer=[NSTimer scheduledTimerWithTimeInterval:15.0 target:self selector:@selector(loadWkWebView) userInfo:@{@"abcd":@"1"} repeats:YES];
  17. // [[NSRunLoop currentRunLoop] addTimer:_timeer forMode:NSRunLoopCommonModes];
  18. // id traget = self.navigationController.interactivePopGestureRecognizer.delegate;
  19. // UIPanGestureRecognizer * pan = [[UIPanGestureRecognizer alloc]initWithTarget:traget action:nil];
  20. // [self.view addGestureRecognizer:pan];
  21. // // 添加滑动手势
  22. // /** 轻扫 */
  23. // UISwipeGestureRecognizer * swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeAction:)];
  24. //
  25. // swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
  26. // [self.view addGestureRecognizer:swipeLeft];
  27. //
  28. // UISwipeGestureRecognizer * swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeAction:)];
  29. // swipeRight.direction = UISwipeGestureRecognizerDirectionRight;
  30. // [self.view addGestureRecognizer:swipeRight];
  31. // // 手势的优先级 优先响应swipe手势
  32. // [pan requireGestureRecognizerToFail:swipeLeft];
  33. // [pan requireGestureRecognizerToFail:swipeRight];
  34. /**
  35. -(void)swipe:(UISwipeGestureRecognizer *)sender {
  36. self.contentView.scrollEnabled=YES;
  37. NSLog(@"%ld", sender.direction); // 判断轻扫手势的方向
  38. if (sender.direction==UISwipeGestureRecognizerDirectionRight) {
  39. NSLog(@"xx1%ld", sender.direction); // 判断轻扫手势的方向
  40. }else if(sender.direction==UISwipeGestureRecognizerDirectionLeft){
  41. NSLog(@"xx%ld", sender.direction); // 判断轻扫手势的方向
  42. }
  43. }
  44. -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
  45. {
  46. // 首先判断otherGestureRecognizer是不是系统pop手势
  47. if ([otherGestureRecognizer.view isKindOfClass:NSClassFromString(@"UILayoutContainerView")]) {
  48. // 再判断系统手势的state是began还是fail,同时判断scrollView的位置是不是正好在最左边
  49. if (otherGestureRecognizer.state == UIGestureRecognizerStateBegan && self.contentView.contentOffset.x == 0) {
  50. return YES;
  51. }
  52. }
  53. return NO;
  54. }
  55. */