我有一个子类 NSBox。在里面我嵌入了一些 NSTextfields,它们在它们的角落显示了一些奇怪的伪影(见这里的图片)。这是我的 NSBox 子类代码:
- (void)drawRect:(NSRect)rect {
NSBezierPath* rectanglePath = [NSBezierPath bezierPathWithRoundedRect:rect
xRadius: 4
yRadius: 4];
[NSColor whiteColor];
[rectanglePath fill];
}
有任何想法吗?谢谢,托马斯