NSImage:initByReferencingURL:
Home 目次>ApplicationKit>NSImage
10.2

initByReferencingURL:

指定したURLからNSImageを初期化します


-(id) initByReferencingURL:(NSURL *)url


【返り値】
   idオブジェクト()
【パラメータ】
   url


【解説】

指定したURLからNSImageを初期化します。



【例文】


#import "SetImage.h"

@implementation SetImage


- (
IBAction )set:( id )sender
{

//Image を作る
NSImage *img;



img = [[NSImage alloc] initByReferencingURL:[NSURL
URLWithString:
@"http://www.oomori.com/image/main.gif" ]];

// レシーバ image NSImageView )に img をセットする
[image setImage : img ];

}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSImage
修正日2006.12.26