WebサイトURLからのnsimage
-
27-09-2019 - |
質問
作成する必要があります 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.
所属していません StackOverflow