setAttachmentSize:forGlyphRange:
テキストアタッチメントのサイズをセットします
-(void)setAttachmentSize:(NSSize)attachmentSize: forGlyphRange:(NSRange)glyphRange:
解説
テキストアタッチメントのサイズをセットします。
返り値
( void )
なし
引数
( NSSize )attachmentSize
アタッチメントのサイズ
( NSRange )glyphRange
グリフの範囲
フレームワーク
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:3]; NSLog([NSString stringWithFormat:@"%.1f,%.1f",size.width,size.height]); [layM1 setAttachmentSize:NSMakeSize(30,30) forGlyphRange:NSMakeRange(1,3)]; size = [layM1 attachmentSizeForGlyphAtIndex:3]; NSLog(@"%.1f,%.1f",size.width,size.height); } @end