sizeForKey:inTable:
テーブルでキーと関連するサイズを返します
-(NSSize)sizeForKey:(NSString *)key:
inTable:(NSString *)table:
解説
テーブルでキーと関連するサイズを返します。なければ幅と高さが0.0のNSSizeを返します。
返り値
( NSSize )
サイズ
引数
( NSString * )key
キー
( NSString * )table
テーブル
フレームワーク
ApplicationKit
クラス
NSPrinter
Instance Methods
使用可能
10.0
参照
- isKey:inTable:
- stringForKey:inTable:
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { //プリンタ NSPrinter *prn = [NSPrinter printerWithName:@"MICROLINE 3050c"]; NSSize size; //適当なサイズのキーが見当たらないので仮にkeyとしています size = [prn sizeForKey:@"key" inTable:@"PPD"]; NSLog([NSString stringWithFormat:@"%.1f,%.1f" ,size.width ,size.height ]); } @end