baselineOffsetInLayoutManager:glyphIndex:
ベースラインオフセット値を返します
-(float)baselineOffsetInLayoutManager:(NSLayoutManager *)layoutMgr: glyphIndex:(unsigned)glyphIndex:
解説
ベースラインオフセット値を返します。
引数
( NSLayoutManager * )layoutMgr
レイアウトマネージャー
( unsigned )glyphIndex
グリフ番号
フレームワーク
ApplicationKit
クラス
NSTypesetter
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { //myOutletはTextView NSLayoutManager *layM = [[NSLayoutManager alloc] init]; float baseLine; unsigned glyphIndex = 0; layM = [myOutlet layoutManager]; baseLine = [[layM typesetter] baselineOffsetInLayoutManager:layM glyphIndex:glyphIndex]; NSLog([NSString stringWithFormat:@"%.2f",baseLine]); } @end