blob: 8471a557c88952cf2c2791257ea05b30ed992f19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
|