I'm using Storyboard and I created a UIButton
with a custom image.
I have a problem that the edges of the button are pixelated:
Image:
Any idea? Thank you!
I'm using Storyboard and I created a UIButton
with a custom image.
I have a problem that the edges of the button are pixelated:
Image:
Any idea? Thank you!
3 Ways to create this button.
Add all assets like @1x, @2x and @3x in the folder.
You can prepare assets by using Prepo or a tool for Xcode RTImageAssets Or any-other tool that fits your requirement.
Use vector image as asset. Article : Use of vectors in Xcode
If you are viewing this in the simulator in scaled mode, the image may appear to be blurry. Viewing this in 100%scaling mode may remove this effect. But if you are having this problem in a device, then there is a problem with your image assets. Using adobe photoshop you can create images according iOS guidelines. This link can help you https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1