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
3
votes
1 answer
NSImageView with high-resolution image causes extreme slowdown when resizing the window
I am creating a simple photo filter app for OS X and I am displaying a photo on an NSImageView (actually two photos on top of each other with two NSImageViews, but the question still applies for a single view too). Everything works super, but when I…

Can Poyrazoğlu
- 33,241
- 48
- 191
- 389
3
votes
0 answers
Refresh NSImageView while NSWindow is being dragged around
I've got a NSTimer which fires every few milliseconds to load and then assign a new image into a NSImageView. The NSTimer has been setup using various run loops (NSRunLoopCommonModes, NSModalPanelRunLoopMode, NSEventTrackingRunLoopMode) just so that…

strange
- 9,654
- 6
- 33
- 47
3
votes
2 answers
Maintain aspect ratio of a view on a NSWindow, rather than the aspect.
I have an image view that i would like to maintain the aspect ratio of but still be able to resize the window.

Maxwell Dergosits
- 297
- 1
- 4
- 12
2
votes
1 answer
How to display a view from a NSViewController?
I'm new at objective-c so please bear with me. I have a class that returns a picture from a webcam and I am trying to display that to the screen. I subclassed NSViewController to get the image from the camera class and set it to an instance…

user1267383
- 103
- 1
- 9
2
votes
0 answers
Layer-backed NSImageView corrupts it's image after entering full screen mode
I have a NSImageView with turned on layer backing on it in IB.
ImageView's image is generating as Quick Look preview. If view is resizing to a bigger size I generate new preview.
All works fine until my App enters full screen mode. After that my…

ruliak
- 114
- 7
2
votes
2 answers
Using NSImageView to display multiple images in quick sucession
I have an application where, in one window, there is an NSImageView. The user should be able to drag and drop ANY FILE/FOLDER (not only images) into the image view, so I subclassed NSImageView class to add support for those types.
The reason why I…

Alex
- 5,009
- 3
- 39
- 73
2
votes
0 answers
Image assets and NSImageView
I have a macOS project, and I want to display a static image.
I'm always annoyed with image assets and Image View.
First, I imported an image in image assets, but I couldn't select the name in the NSImageView in IB. So, I typed directly the name,…

FredericP
- 1,119
- 1
- 14
- 27
2
votes
3 answers
How to move NSImageView inside NSView in Cocoa?
In my Mac OS app I need a functionality to be able to move NSImageView around inside an NSView after mouseDown event (triggered by user) happen in this NSImageView. When the user triggers mouse Up event, this view must move to the last mouseDrag…

Adelmaer
- 2,209
- 3
- 22
- 45
2
votes
1 answer
NSTextField is blurry in NSTableView when image is inserted in a row
In my view-based NSTableView, each view has (among other stuff) an NSTextField, and an NSImageView right below the text field.
Sometimes, when I insert a new row at the top of the table, and this row has an image in its NSImageView, the text in the…

Eric Aya
- 69,473
- 35
- 181
- 253
2
votes
1 answer
How to move CALayer on NSImageView
There is a subclass of NSImageView and the instance of CALayer is created, so we see a rectangle on the image. Questions is how to move this rectangle when mouse is down (when mouse pointer inside of the rectangle) and dragged. When mouse is up this…

VYT
- 1,071
- 19
- 35
2
votes
1 answer
Help with Xcode
I am totally new to Xcode, and I need a little bit of help...
I've created a cocoa project, and then opened the main.xib file in "Interface Builder".
From Interface Builder, I added an NSImageView object, and set the image to a gif file inside my…

Georges Oates Larsen
- 6,812
- 12
- 51
- 67
2
votes
1 answer
NSImageView: horizontal fit-to-container-width, vertical aspect-scale
I wish to embed an NSImageView in an NSScrollView such that when the NSScrollView is resized, its document view (ie, the NSImageView) is resized horizontally (up or down) to match the width of the NSScrollView, while its contents are scaled to…

Jamborino
- 161
- 9
2
votes
1 answer
Binding valuePath to NSImageView causes NSImageView.image to return nil when dragging new images onto imagewell
I have a NSImageView which operates as an image well. It is also bound via. a value transformer using the value path property to display saved images for each record (the value transformer just appends the file path - I just store the image's file…

glenstorey
- 5,134
- 5
- 39
- 71
2
votes
2 answers
How to scale down NSImageView proportionally using auto layout?
I have multiple NSImageView of different dimensions and proportions that are stacked vertically in a view that has limited horizontal space.
Since the image dimensions can be larger than the size of the parent view I want to scale them down…

Robin Andersson
- 5,150
- 3
- 25
- 44
2
votes
0 answers
Set background color of NSImageView with proportionally sized image
I have subclassed an NSImageView which carries an image set to NSImageScaleProportionallyDown so it will not always occupy the whole space of the view - this is working as it should. Now I don't know how to change the background color respectively…

riccardolardi
- 1,713
- 5
- 20
- 35