UIBarButtonItem 图像出现像素化
UIBarButtonItem image appears pixelated
在我的 IOS 应用程序中,我试图将图像合并到 UIBarButtonItems 上。我在 IconFinder 上找到了一些图标,但是当我使用 Storyboard 指定图像时(我导出了 22x22 像素的 png)它们看起来像素化了。
它在情节提要中看起来不错,但在我的设备/模拟器中像素化了:
如何确保 UIBarButtonItem 图像不像素化?我读过它们应该是 22x22。
它们应该是 22 x 22 点 。您正在处理像素。
如果您要针对 iPhone 6 Plus 进行优化,则需要一张 44 x 44 的 @2x 图像和一张 66 x 66 的 @3x 图像。
Here's a helpful link about the difference between points and pixels
在我的 IOS 应用程序中,我试图将图像合并到 UIBarButtonItems 上。我在 IconFinder 上找到了一些图标,但是当我使用 Storyboard 指定图像时(我导出了 22x22 像素的 png)它们看起来像素化了。
它在情节提要中看起来不错,但在我的设备/模拟器中像素化了:
如何确保 UIBarButtonItem 图像不像素化?我读过它们应该是 22x22。
它们应该是 22 x 22 点 。您正在处理像素。
如果您要针对 iPhone 6 Plus 进行优化,则需要一张 44 x 44 的 @2x 图像和一张 66 x 66 的 @3x 图像。
Here's a helpful link about the difference between points and pixels