Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image is stretched out if set as background #2

Open
Jackson0111 opened this issue Jan 10, 2016 · 1 comment
Open

image is stretched out if set as background #2

Jackson0111 opened this issue Jan 10, 2016 · 1 comment

Comments

@Jackson0111
Copy link

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?

@yannickl
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants