diff options
Diffstat (limited to 'VKPC/PopoverClipView.m')
-rw-r--r-- | VKPC/PopoverClipView.m | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/VKPC/PopoverClipView.m b/VKPC/PopoverClipView.m new file mode 100644 index 0000000..8471a55 --- /dev/null +++ b/VKPC/PopoverClipView.m @@ -0,0 +1,35 @@ +// +// PopoverClipView.m +// VKPC +// +// Created by Eugene on 11/3/14. +// Copyright (c) 2014 Eugene Z. All rights reserved. +// + +#import "PopoverClipView.h" +#import <QuartzCore/QuartzCore.h> + +@implementation PopoverClipView + +- (id)initWithFrame:(NSRect)frameRect { + self = [super initWithFrame:frameRect]; + if (!self) return nil; + + self.layer = [CAScrollLayer layer]; + self.wantsLayer = YES; + self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawNever; + + return self; +} + +- (void)drawRect:(NSRect)dirtyRect { + [super drawRect:dirtyRect]; + + // Drawing code here. +} + +- (BOOL)wantsLayer { + return YES; +} + +@end |