An NSImageView object displays a single image from an NSImage object in a frame. An editable image view object behaves as an image well and supports copying, pasting, dragging, and using the Delete key to clear its content.
Questions tagged [nsimageview]
248 questions
0
votes
1 answer
how to translate and scale a NSImage?
I have built so far an application that allows the user to drag and drop images onto a NSImageView. However, I want to be able to move these images by simply clicking on any image and hold down the mouse button to move it's location.
How can I…

ObjectiveC-InLearning
- 443
- 1
- 7
- 20
0
votes
1 answer
How to display a .bmp in an NSImageView for MacOs so that a certain color is transparent?
I have some .bmp files that have some color (maybe black) that is supposed to show as transparent when the graphic is displayed on top a form, so the form color comes through the transparent areas. But by default, when I put these images in an…

Bo A
- 138
- 9
0
votes
1 answer
Is it possible to drag and drop PNG images from your desktop into a running Cocoa application?
I want to build a Cocoa application where I'm able to just grab PNGs from either a folder or desktop, and drag and drop it into an already running Cocoa application window, and that application will take that png in and simply display it on the…

ObjectiveC-InLearning
- 443
- 1
- 7
- 20
0
votes
1 answer
Loading an online GIF image into NSImageView
I can't seem to get an online GIF image to load into an NSImageView. Please see my code below and offer some comments to remedy this.
#import
@interface ImageFromUrl : NSObject
@property (strong) NSString…

wigging
- 8,492
- 12
- 75
- 117
-1
votes
1 answer
Extremely weird image retaining behavior of a NSImageView
I've narrowed down the problem to this:
// newImage is passed from elsewhere
NSLog(@"retain count first : %lu", [newImage retainCount]);
img = newImage;
[imgView setImage:newImage];
NSLog(@"retain count next : %lu", [newImage retainCount]);
[imgView…

houbysoft
- 32,532
- 24
- 103
- 156
-1
votes
1 answer
Swift Cocoa - How to load system image "NSCaution" into NSImageView?
I'm trying to load the system image called NSCaution programmatically. I can easily load it with Interface Builder since it's one of the displayed options for NSImageView:
However, the following code does not work. It always sets img to nil:
let…

fsctl
- 161
- 8
-1
votes
1 answer
Border around the image within an NSImageView
I have an NSImageView which contains an image. Is there a simple way to draw a border around just the image (which might be smaller than the NSImageView), and not the entire NSImageView?

Anshuman Sharma
- 417
- 2
- 11
-2
votes
1 answer
Unrecognized selector with array objects.
The NSImageView objects once in the array become strings. How to I convert them into NSImageView to avoid unrecognized selector error generated by the last line?
NSArray *array = [NSArray arrayWithObjects: @"chip1”, @"chip2” nil],
for (id image in…

user3298247
- 3
- 2