setVerticallyCentered:
天地方向の中心に置くかをセットします
-(void)setVerticallyCentered:(BOOL)flag:
解説
天地方向の中心に置くかをセットします
flagがYESなら、画像は天地の中心におかれます。
返り値
( void )
なし
引数
( BOOL )flag
YES/NO
フレームワーク
ApplicationKit
クラス
NSPrintInfo
Instance Methods
使用可能
10.0
参照
- isHorizontallyCentered
- isVerticallyCentered
- setHorizontallyCentered:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSPrintInfo *pInfo = [NSPrintInfo sharedPrintInfo] ; NSPageLayout *pageLayout = [NSPageLayout pageLayout]; [pInfo setVerticallyCentered:YES]; [pageLayout beginSheetWithPrintInfo:pInfo modalForWindow:[sender window] delegate:self didEndSelector:@selector(didEndPageLayout) contextInfo:nil ]; if ([pInfo isVerticallyCentered]) { NSLog(@"YES"); }else{ NSLog(@"NO"); } } -(void)didEndPageLayout { NSLog(@"close"); } @end