macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

setIntAttribute:value:forGlyphAtIndex:

カスタム属性値をセットします
-(void)setIntAttribute:(int)attributeTag:
      value:(int)anInt:
      forGlyphAtIndex:(unsigned)glyphIndex:

解説

カスタム属性値をセットします。
【attributeTag】属性タグ
0以上のタグは予約済み、負の値を定義することはできます。

返り値

( void )

なし

引数

( int )attributeTag

属性タグ

( int )anInt

整数値

( unsigned )glyphIndex

グリフ番号

フレームワーク

ApplicationKit

クラス

NSLayoutManager

Instance Methods

使用可能

10.0

参照

- intAttribute:forGlyphAtIndex:

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
	{
	//myOutletはTextView
	NSLayoutManager *layM1;
	int attributeTag = (-1);
	int anInt = 1;
	unsigned int glyphIndex=60;


	layM1 = [myOutlet1 layoutManager];

	[layM1 setIntAttribute:attributeTag value:anInt forGlyphAtIndex:glyphIndex];

	NSLog(@"%d",[layM1 intAttribute:attributeTag forGlyphAtIndex:glyphIndex]);

	[[sender window] display];

}
@end