Weird three20 graphics bug in thumb viewer when running in release mode

冷暖自知 提交于 2019-12-11 06:44:18

问题


I've just encountered the strangest problem with the three20 thumbs viewer.

When running in debug, my TTThumbsViewController works completely normally, however if I switch to release mode (ad-hoc and on the live app store version), I get some pretty weird graphical glitches.

For example, the loading view of the thumb controller:

http://img.skitch.com/20120125-kugx5diqbs8sttnxatrppf4rjg.jpg

And then all my thumbnails get squashed:

http://img.skitch.com/20120125-mi3mpkr1j1s9f79fdf9r3krjhs.jpg

I'm running the latest (master) version of three20, and have only made one slight modification to the source, to stop the header bar appearing at the top of the gallery view.

I added the following method to TTTableViewDelegate.m:

- (float)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 0; // disable headers in TTTableViews - prevents header on thumbs view in iOS 5
}

In conclusion:

  • Can anyone repro (with release)?
  • What can I do?
  • Would that modification I made be causing these issues (bear in mind it only happens with the release build)?

If anyone has any ideas that would be great as this is currently live on the app store (I know I'm an idiot for not testing with release - this should teach me).


回答1:


The problem is with the LLVM compiler bundled with Xcode 4.2 when compiling for armv6 devices on iOS 4.2.1.

The problem and solution are described here: Strange layout issue on 3GS device with iOS 4.2.1 - Compiled with iOS 5

You need to add the -mno-thumb flag to your compiler flags for armv6 i.e.




回答2:


Method with setting -mno-thumb in MY PROJECT SETTINGS didn't worked for me, But this is exactly issue of the

LLVM compiler bundled with Xcode 4.2 when compiling for armv6 devices

Fast way to do this is to update little Three20's Library.xconfig, which is located in Three20/src/Configurations/common folder

Find the line for linker flags configuration, and add line with -mno-thumb to it.

// Linker Flags    
OTHER_LDFLAGS           = $(OBJC_LIBRARY)

// We needed this to resolve horrible bug
// When your'e setting value on origin.x and it is applied to origin.y
OTHER_CFLAGS[arch=armv6] = -mno-thumb

Profit.



来源:https://stackoverflow.com/questions/9009883/weird-three20-graphics-bug-in-thumb-viewer-when-running-in-release-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!