setMatchesOnMultipleResolution:
複数解像度の画像表示がデバイスと合うかをセットします
-(void)setMatchesOnMultipleResolution:(BOOL)flag:
解説
複数解像度の画像表示がデバイスと合うかをセットします。
返り値
( void )
なし
引数
( BOOL )flag
YES/NO
フレームワーク
ApplicationKit
クラス
NSImage
Instance Methods
使用可能
10.0
参照
例文
#import "SetImage.h" @implementation SetImage - (IBAction)set:(id)sender { //Imageを作る NSImage *img; //OpenPanelでファイル選択 //NSImageを作ってファイルから読み込む img = [NSImage imageNamed: @"NSApplicationIcon" ]; [img setMatchesOnMultipleResolution:YES]; ([img matchesOnMultipleResolution]) ? NSLog(@"YES") : NSLog(@"NO"); //レシーバimage(NSImageView)にimgをセットする [image setImage : img ]; } @end