Reputation: 766
I'm going to try to keep this relatively simple. I have a NSImageView, and I would like to change it's (x,y) position on the screen programmatically.
How would I go about doing this?
Upvotes: 0
Views: 55
Reputation: 7049
If you add one programmatically, make sure you have translatesAutoresizingMaskIntoConstraints
set to false
, then set the frame of the NSImageView using the frame property
imageView.frame = NSMakeRect(x, y, w, h);
Upvotes: 1