macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

drawBarInside:flipped:

スライダーセルの溝を描くときに呼ばれます
-(void)drawBarInside:(NSRect)aRect:
         flipped:(BOOL)flipped:

解説

スライダーセルの溝を描くときに呼ばれます。
このメソッドを直接呼び出しません。
サブクラスでオーバーライドして使います。

返り値

( void )

なし

引数

( NSRect )aRect

矩形

( BOOL )flipped

フレームワーク

ApplicationKit

クラス

NSSliderCell

Instance Methods

使用可能

10.0

参照

- drawKnob:

例文

#import "MySliderCell.h"
//ステッパーセルのサブクラス
@implementation MySliderCell
-(void)drawBarInside:(NSRect)aRect flipped:(BOOL)flipped
{
//NSLog(@"!!!");
//[super drawBarInside:aRect flipped:flipped];

NSBezierPath *thePath = [NSBezierPath bezierPath];
[thePath setLineWidth:2.0];
[thePath moveToPoint:NSMakePoint(20,20)];
[thePath appendBezierPath:[NSBezierPath bezierPathWithOvalInRect:aRect]];
[[NSColor redColor] set];

[thePath stroke];

}@end