DynamicButton icon indicating copy to clipboard operation
DynamicButton copied to clipboard

image is stretched out if set as background

Open Jackson0111 opened this issue 10 years ago • 1 comments

I'm trying to set an image as background, it works but the image is like stretched out - very ugly lol. Is there a way to fix that? or am I doing something wrong with the image?

Jackson0111 avatar Jan 10 '16 14:01 Jackson0111

How is it stretched? I think it is the expected behaviour of the UIButton. Have you the same effect with an UIButton?

By default the UIButton stretched the background image, you'll have to the setImage:forState: and use these kind of trick: button.imageView?.contentMode = .Center

yannickl avatar Jan 11 '16 20:01 yannickl