UITableView Cells的图像有变化吗? [英] Images of UITableView Cells change?

查看:100
本文介绍了UITableView Cells的图像有变化吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我完成了一个应用程序内购买应用程序,并且在iPad / Iphone上进行了几次测试后,每件事都很好,桌面视图的单元格及其高度的图像与代码中写的一模一样,所以我上传了应用程序当它被处理到app Store时,我下载它,IPhone / IPad中的表视图单元格的大小都比测试时设置的大小大得多,因此单元格中的图像就像拉伸!!!!不清楚,我试着直接通过xcode测试它到我的设备,它几乎和以前一样好,但问题是只有从商店下载时,

While i finished developing an in-app-purchase application, and after several testing on iPad/Iphone, every thing was fine, the images of table view's cells and its hight was exactly as wrote in code, so i upload the application, when it was processed to the app Store, i download it, the table view cells in both IPhone/IPad were in different sizes much bigger size then that was set while testing,so the image in cells was like stretched!!!!and not clear, i tried to test it then directly via xcode to my device, it was almost fine as before, but the problem is only when downloading from store,

我真的感谢任何帮助,

I really appreciate any help,

问候,

推荐答案

这很可能与浮点计算优化有关。

This is quite likely to be do with floating-point calculation optimization.

w ^ hen build for release,默认情况下,Xcode将尝试完全优化您的代码,包括使您的浮点计算更有效。但是,有时它们可​​能会被错误地优化,这可能会导致重大问题,尤其是视图的定位/大小调整等。

When building for release, by default, Xcode will try to fully optimize your code, including making your floating-point calculations more efficient. However, sometimes they can be incorrectly optimized, and this can cause major issues especially with positioning / sizing of views etc.

对我来说,这是在构建发布版+ armv6时发生的架构,我之前已经完全相同的问题(仅在发布时才实现)。

For me, this happens when building for release + armv6 architecture, and I've had exactly the same problem (only realized when released) before.

值得庆幸的是,有一种方法可以禁用浮点优化。方法如下:

Thankfully, there is a way to disable the floating-point optimizations. Here's how:

使用LLVM GCC 4.2


  1. 单击左侧文件窗格中的项目

  2. 单击目标下的项目名称(如下所示),然后单击构建设置。

  3. 在右侧的搜索框中搜索thumb

  4. 您应该看到一个名为Compile for的设置ThumbunderLLVM GCC 4.2 - 代码生成。如果你不这样做,那是因为你正在使用Apple LLVM编译器3.0(下面的说明)。

  5. 将鼠标悬停在Release上,然后点击加号图标。

  6. 应该出现一个新选项,通过下拉菜单从下拉列表中选择ARMv6。

  7. 然后为该选项选择否。它现在应该如下所示:

  1. Click on your project in the files pane on the left
  2. Click the project name under Targets (as seen below), then click "Build Settings".
  3. Search for "thumb" in the search box on the right hand side
  4. You should see a setting called "Compile for Thumb" under "LLVM GCC 4.2 - Code Generation". If you don't, it's because you're using the Apple LLVM compiler 3.0 (instructions for that are below).
  5. Hover over Release, and click the plus icon.
  6. A new option should appear, with a drop-down, select "ARMv6" from the dropdown.
  7. Then select "No" for that option. It should now look like below:

使用Apple LLVM 3.0编译器


  1. 按照上面的步骤1和2进行操作。

  2. 在搜索中搜索其他c标志 box

  3. 按照上述相同步骤添加ARMv6 +版本的特定配置。

  4. 双击带有标志的框,然后添加标志 -mno-thumb 。它现在应该如下所示

  1. Follow steps 1 and 2 above.
  2. Search for "other c flags" in the search box
  3. Follow the same steps above to add a specific configuration for ARMv6 + release.
  4. Double-click the box with the flags in, and add the flag -mno-thumb. It should now look like below

如果在此之后仍然存在发布版本问题,您可能想尝试全局禁用compile for thumb 。

If it still has issues under the release build after that, you may want to try disabling compile for thumb globally.

希望有所帮助。

这篇关于UITableView Cells的图像有变化吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆