質問

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

ありがとう

役に立ちましたか?

解決

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

 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#//aple_ref/occ/instm/nsimage/initwithentsofurl:

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top