macOS/iOS API解説

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

目次

insertionPointColor

挿入ポイントの描画色を返します

解説

挿入ポイントの描画色を返します。

返り値

( NSColor * )

描画色

引数

フレームワーク

ApplicationKit

クラス

NSTextView

Instance Methods

使用可能

10.0

参照

- drawInsertionPointInRect:color:turnedOn:
- shouldDrawInsertionPoint
- setInsertionPointColor:

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSColor *theColor = [NSColor colorWithDeviceRed:1 green:0.3 blue:0.8 alpha:1];//カラー作成

[myOutlet setInsertionPointColor:theColor];
[myOutlet insertText:[NSString stringWithFormat:@"Red=%.2f",[theColor redComponent]]];

}

@end