Setting 1x1 px image as background image of UIButton makes the button not visible in IB.

Hello everyone,


when configuring a button in IB, I set background image of this button with a 1x1 px image. Since the button do not have a background color and color of the button title is white, it's not visible in IB. Bigger size images do not have this issue. It makes me a little inconvenient when working in IB. Is it a bug of Xcode? Is there a workaround?

The version of Xcode is 7.2. Thank you very much.

Answered by jox0 in 100281022

Well I figured out. Turns out it's because I put the 1px image to 2x image set. After put it to 1x image set, it works.

Accepted Answer

Well I figured out. Turns out it's because I put the 1px image to 2x image set. After put it to 1x image set, it works.

Setting 1x1 px image as background image of UIButton makes the button not visible in IB.
 
 
Q