temporaryAttributesAtCharacterIndex:effectiveRange:
指定した文字の一時的な文字属性の辞書を返します
-(NSDictionary *)temporaryAttributesAtCharacterIndex:(unsigned)charIndex: effectiveRange:(NSRangePointer)effectiveCharRange:
解説
指定した文字の一時的な文字属性の辞書を返します。effectiveCharRangeで、同じ属性の範囲が返されます。
返り値
( NSDictionary * )
文字属性の辞書
引数
( unsigned )charIndex
文字番号
( NSRangePointer )effectiveCharRange
適用されている範囲
フレームワーク
ApplicationKit
クラス
NSLayoutManager
Instance Methods
使用可能
10.0
参照
例文
- (IBAction)remove:(id)sender { NSLayoutManager *layM; NSDictionary *dic; NSRange range; layM = [myOutlet layoutManager]; dic = [layM temporaryAttributesAtCharacterIndex:4 effectiveRange:&range ]; NSLog([NSString stringWithFormat:@"%@",[dic description]]); NSLog([NSString stringWithFormat:@"range %d-%d",range.location,range.length]); }