Reputation: 2202
I have an NSCollectionViewItem
with an NSImageView
(32x32) to which i supply a @1x image of the same size.
It looks perfect in the interface builder, but when the app is built, the resolution looks quite off. Is there any particular reason for this?
Just to add that the Image in the asset manager also has a @2x
EDIT: Still investigating this issue, but I have just noticed that If the collection view which contains the collection item, which contains the NSImageView
is enclosed by a bordered NSSCrollView
the images are perfect (.ie non blurry)
Upvotes: 1
Views: 102
Reputation: 2202
Turns out if you draw images in frames with either the x,y coords or the height and width having fractions you end up with blurry images. passing the drawingRect through NSIntegralRect fixes that.
Upvotes: 1