現在、次のようにカスタム NSCell で NSImage を描画しています。
- (void)drawInteriorWithFrame:(NSRect)theCellFrame inView:(NSView *)theControlView {
// roundedCornerImage creates a new NSImage with rounded corners, rather than clipping.
[[anIcon roundedCornerImage:5] drawInRect:anIconBox fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
}
非常に単純に、その下に画像を描く方法を考えています。iPhone では、次を使用してこれを行いますCGContextSetShadow (currentContext, CGSizeMake(1, -1), 2)
。UIImageを描画する直前ですが、Macでそれを行う方法に慣れていません。
どんな指針も素晴らしいでしょう。