iphone - UIButton 自定义视网膜图像在 iPad 视网膜显示器中拉伸(stretch)

标签 iphone ios ipad ios5 ios6

我对 iPad 视网膜图像有一个问题。当我在普通 ipad 中执行我的添加时,它看起来很棒。

但是当我在 iPad Retina 中执行此应用程序时,UIButton 自定义图像会向上拉伸(stretch)。

我还为视网膜模式的“@2x”图标图像添加了图像。

使用这段代码:

UIButton *btnEye=[[UIButton alloc] initWithFrame:CGRectMake(10, 5.5, 35, 35)];
[btnEye setImage:eyeImage forState:UIControlStateNormal];
[reportToolbar addSubview:btnEye];

在正常模式下:

enter image description here

在 Reitna 模式下:

enter image description here

最佳答案

视网膜图像的分辨率真的是正常图像的两倍还是与正常图像具有相同的分辨率?

关于iphone - UIButton 自定义视网膜图像在 iPad 视网膜显示器中拉伸(stretch),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13641909/

相关文章:

ios - iOS 7 中 UINavigationController 中的不完整景观过渡

iphone - iPad 通用的 xib 文件问题

iPhone - 如何在进入前景后恢复帧大小?

iphone - 如何在 iPhone 中查看 eps 文件?

ios - iPad 版 iOS App

ios - Swift 中的 UIWebView 问题

iphone - 识别按下选项卡按钮以移动到下一个响应者

iphone - IOS SDK - NSLock 消息 : "unlocked from thread which did not lock it"

iphone - 来自 UITapGestureRecognizer 的 CGPoint

ios - 使用自定义流布局在 Collection View 中向标题添加搜索栏