xcode 10 button image not correctly sized (worked in xcode 9)

I'm finding that my buttons with images are not showing correct sized images in the main storyboard or in previews - It seems to be using the 3x images instead of the 1x image size. When I run on device it shows using the correct expected size and image is much smaller.


Before upgrading from xcode 9 the images were correctly sized in both the storyboard and previews. Has anyone else had this issue?

Tested here, on iMac (Retina) and iPhone 5C.


Effectively, adding a 2x image in XCAsset change the image size in the button.

But gives the same result in IB and on simulator and device running 10.3

So, I get:

1x only: large image everywhere

2x only or 1x and 2x : smaller image

3x only : still smaller image, everywhere

1x and 3x: larger image (1x is selected)

2x and 3x : 2x selected

1x, 2x and 3x : 2x selected

I've made a google doc where I've pasted screen shots of what I'm seeing in xCode and simulator to show exactly the behavior I'm experiencing


https://docs.google.com/document/d/1a3h5U1A5k82fDu-jar3kBAlMSTBwNLqkzDtlpkOpVbc/edit?usp=sharing


You can see the images in IB don't match simulator unless I force the size of the storyboard to be the size of the physical device.

I think you're explaining another issue that's probably related?


My issue is specifically - the 2x image that is displayed on the storyboard/preview view much larger version that what I see when I run the app in simulator or physical device.


The only way to make the storyboard reflect what I see on device and simulator is by changing the simulated size of the view controller.

*This does not make the preview show the appropriate size. It also causes other issues and isn't a viable work around. It only makes the sizing appropriate in a superficial way.


I've tried to reply with a google doc that contains screenshots of what I'm seeing but it's stuck currently in moderation.

I've submitted a bug report for this issue (46118653)


This is a blocking issue for me currently.

Opening the project in xCode 9 Version 9.4.1 (9F2000) shows button images appropriately sized as expected.

My links are being moderated but please scroll to the bottom of my Google Docs link. I've opened the same project in both xcode 10 and xcode 9 and generated screenshots from each to demonstrate the image sizing issue I'm seeing


Thanks

To avoid moderation when you post links, just type h ttps::// of the usual.

Do you change the drawing between 1x, 2x, 3x ?

Sorry for the late reply.


I did change the drawings between 1x, 2x,and 3x - I ran a test much like what you suggested in your post - You can see the results in the last 2 pages of the google docs I linked above. I create a number of image going through the variations of image sizes.


Currently my work around is I downloaded xcode9 and I use that for editing my storyboard and then I build in xcode10.

I've been having this problem too. Did you ever find a solution, or just an explanation?

Is this now yet another XCode bug we have to live with?
xcode 10 button image not correctly sized (worked in xcode 9)
 
 
Q