setOrientation:
用紙方向をセットします
-(void)setOrientation:(NSPrintingOrientation)orientation:
解説
用紙方向をセットします。
【NSPrintingOrientation】
● NSPortraitOrientation 縦向き
● NSLandscapeOrientation 横向き
返り値
( void )
なし
引数
( NSPrintingOrientation )orientation
フレームワーク
ApplicationKit
クラス
NSPrintInfo
Instance Methods
使用可能
10.0
参照
- dictionary
- initWithDictionary:
- orientation
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSPrintInfo *pInfo = [NSPrintInfo sharedPrintInfo] ; NSPageLayout *pageLayout = [NSPageLayout pageLayout]; [pInfo setOrientation:NSLandscapeOrientation]; [pageLayout beginSheetWithPrintInfo:pInfo modalForWindow:[sender window] delegate:self didEndSelector:@selector(didEndPageLayout) contextInfo:nil ]; NSLog([NSString stringWithFormat:@"%d",[pInfo orientation]]); } -(void)didEndPageLayout { NSLog(@"close"); } @end