KMMaskView.m 703 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // KMMaskView.m
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by zenghong on 6/20/23.
  6. //
  7. #import "KMMaskView.h"
  8. @implementation KMMaskView
  9. - (void)dealloc
  10. {
  11. }
  12. - (void)drawRect:(NSRect)dirtyRect {
  13. [super drawRect:dirtyRect];
  14. self.wantsLayer = YES;
  15. self.layer.backgroundColor = [NSColor clearColor].CGColor;
  16. }
  17. - (instancetype)initWithFrame:(NSRect)frameRect
  18. {
  19. self = [super initWithFrame:frameRect];
  20. if (self) {
  21. }
  22. return self;
  23. }
  24. #pragma mark - Mouse Event
  25. //重写是为了防止时间传递到父视图上去。具体的体现是隔着一个View还能操作window
  26. - (void)mouseDown:(NSEvent *)event
  27. {
  28. }
  29. - (void)mouseUp:(NSEvent *)event
  30. {
  31. }
  32. @end