JXHomeScrollView.m 959 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // JXHomeScrollView.m
  3. // shiku_im
  4. //
  5. // Created by os on 2020/7/8.
  6. // Copyright © 2020 Reese. All rights reserved.
  7. //
  8. #import "JXHomeScrollView.h"
  9. #import "UIScrollView+JXUITouch.h"
  10. @implementation JXHomeScrollView
  11. /*
  12. // Only override drawRect: if you perform custom drawing.
  13. // An empty implementation adversely affects performance during animation.
  14. - (void)drawRect:(CGRect)rect {
  15. // Drawing code
  16. }
  17. */
  18. -(id)initWithFrame:(CGRect)frame
  19. {
  20. self = [super initWithFrame:frame];
  21. if (self) {
  22. }
  23. return self;
  24. }
  25. - (void)dealloc
  26. {
  27. }
  28. - (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view
  29. {
  30. NSLog(@"用户点击了scroll上的视图%@,是否开始滚动scroll",view);
  31. //返回yes 是不滚动 scroll 返回no 是滚动scroll
  32. return YES;
  33. }
  34. - (BOOL)touchesShouldCancelInContentView:(UIView *)view
  35. {
  36. NSLog(@"用户点击的视图 %@",view);
  37. return NO;
  38. }
  39. @end