attachmentSizeForGlyphAtIndex:
指定したグリフの番号のテキストアタッチメントのサイズを返します
-(NSSize)attachmentSizeForGlyphAtIndex:(unsigned)glyphIndex:
解説
指定したグリフの番号のテキストアタッチメントのサイズを返します。
返り値
( NSSize )
サイズ
引数
( unsigned )glyphIndex
グリフ番号
フレームワーク
ApplicationKit
クラス
NSLayoutManager
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { //myOutletはTextView NSLayoutManager *layM1; NSSize size; layM1 = [myOutlet1 layoutManager]; size = [layM1 attachmentSizeForGlyphAtIndex:2]; NSLog([NSString stringWithFormat:@"%.1f,%.1f",size.width,size.height]); } @end