问题
Using Xcode I am trying to change an image object to another image. I am using ObjC Applescript. I have an IB Outlet testImage : missing value
and using tell testImage to setImage("sample.png")
to change the image.
回答1:
The following code should do the trick:
set image to current application's NSImage's imageNamed_("sample.png")
testImage's setImage_(image)
来源:https://stackoverflow.com/questions/42965369/how-do-i-change-an-nsimageview-object-to-its-alternate-image-in-objective-c-appl