glyphRangeForTextContainer:
テキストコンテナの範囲内で配置されるグリフの範囲を返します
-(NSRange)glyphRangeForTextContainer:(NSTextContainer *)aTextContainer:
解説
テキストコンテナの範囲内で配置されるグリフの範囲を返します。
返り値
( NSRange )
範囲
引数
( NSTextContainer * )aTextContainer
テキストコンテナ
フレームワーク
ApplicationKit
クラス
NSLayoutManager
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { //myOutletはTextView NSRange range; NSLayoutManager *layM1; NSTextContainer *textContainer = [[NSTextContainer allocWithZone:NULL] initWithContainerSize:NSMakeSize(1.0e6, 1.0e6)]; layM1 = [myOutlet1 layoutManager]; range = [layM1 glyphRangeForTextContainer:[myOutlet1 textContainer]]; NSLog([NSString stringWithFormat:@"%u,%u",range.location,range.length]); } @end