4

URL からを作成し、NSImageそれをアプリケーションのイメージ ビューに設定する必要があります。オンラインで見つけたコードをいくつか試しましたが、うまくいきませんでした。誰かがこれを行う方法を知っていれば、どんな助けも素晴らしいでしょう.

ありがとう

4

1 に答える 1

5

あなたは見たいと思うでしょう

 initWithContentsOfURL:
Initializes and returns an NSImage instance with the contents of the specified URL.

- (id)initWithContentsOfURL:(NSURL *)aURL

Parameters
aUrl
The URL identifying the image.
Return Value
An initialized NSImage instance, or nil if the method cannot create an image representation from the contents of the specified URL.

http://developer.apple.com/mac/library/documentation/cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html#//apple_ref/occ/instm/NSImage/initWithContentsOfURLから:

于 2010-04-18T02:28:43.583 に答える