rangeForUserCharacterAttributeChange
挿入ポイント、選択範囲と同じ属性の文字範囲を返します
解説
挿入ポイント、選択範囲と同じ属性の文字範囲を返します。
プレーンテキストならば、全範囲
テキストビューが編集可能でないか、フォントパネルを使わないならば、NSNotFoundを返します。
返り値
( NSRange )
範囲
引数
フレームワーク
ApplicationKit
クラス
NSTextView
Instance Methods
使用可能
10.0
参照
- rangeForUserParagraphAttributeChange
- rangeForUserTextChange
- isEditable
- usesFontPanel
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { [myOutlet insertText: [NSString stringWithFormat:@"%d", [myOutlet rangeForUserCharacterAttributeChange] .location ]]; } @end