【问题标题】:Images not displaying on iPad AIR, but display on other iPads图像不在 iPad AIR 上显示,但在其他 iPad 上显示
【发布时间】:2014-12-01 22:51:59
【问题描述】:
我的图像不在 iPad AIR 上显示,但在其他 iPad 上显示。它们没有显示在图像视图或按钮上。除了我的图像,分段控件图像也没有显示,尽管我仍然可以点击我知道它们存在于 UI 上的按钮和分段控件。我发现我的按钮上的背景图像确实显示,但我的按钮上的图像没有。也许这会有所帮助 - 我认为这是在我收到关于截至 2/1/15(验证期间)所需的 64 位支持的消息之后开始的,建议我将默认构建设置更改为“标准架构”。进行此建议更改后,图像停止显示。
在 Build Settings 中,在 Architectures: Before: $(ARCHS_STANDARD_32_BIT) After: Standard Architectures (armv7, arm64) 下
当我改回来时,图像又开始显示了。
感谢您的帮助!
【问题讨论】:
标签:
ios
ipad
air
ios8
xcode6
【解决方案1】:
我发现了与 iPad Air 上的 64 位处理有关的错误。我有一个 UIImageView+Category 文件来尝试并始终显示垂直滚动条。该文件导致了问题,我将其删除以修复错误。希望这可以帮助其他人。谢谢
@implementation UIImageView (ForScrollView)
- (void) setAlpha:(float)alpha {
if (self.superview.tag == noDisableVerticalScrollTag) {
if (alpha == 0 && self.autoresizingMask == UIViewAutoresizingFlexibleLeftMargin) {
if (self.frame.size.width < 10 && self.frame.size.height > self.frame.size.width) {
UIScrollView *sc = (UIScrollView*)self.superview;
if (sc.frame.size.height < sc.contentSize.height) {
return;
}
}
}
}
if (self.superview.tag == noDisableHorizontalScrollTag) {
if (alpha == 0 && self.autoresizingMask == UIViewAutoresizingFlexibleTopMargin) {
if (self.frame.size.height < 10 && self.frame.size.height < self.frame.size.width) {
UIScrollView *sc = (UIScrollView*)self.superview;
if (sc.frame.size.width < sc.contentSize.width) {
return;
}
}
}
}
[super setAlpha:alpha];
}
@end
【解决方案2】:
我们遇到了同样的问题。经过一些研究,我感到很失望,因为这似乎很奇怪。确实如此。
对我来说,重新启动我的 Mac 有帮助...是的,这不是您想要的答案,但确实起到了作用。清理,删除派生数据,Xcode重启等之前没有效果。