Strange layout issue on 3GS device with iOS 4.2.1 - Compiled with iOS 5

后端 未结 2 1042
攒了一身酷
攒了一身酷 2021-02-06 13:51

We had a strange bug report from a user who has iOS 4.2.1 on an iPhone 3GS. A lot of the UITextLabels in the app are offset at strange locations. Has anyone else come across thi

2条回答
  •  孤城傲影
    2021-02-06 14:27

    We hit exactly the same issue with our layouts. We are not using Three20 though. There is a known issue when building with iOS 5.0 and running on iOS 4.2.1 that causes CGRects to be initialised incorrectly once you are using optimised code. (ie compiled with the fastest,smallest optimization level) so you won't see it when testing on a debug version which usually has this set to None.

    There is a workaround to fix it. You simply need to add a compiler flag for:

    "OTHER_CFLAGS[arch=armv6]" = "-mno-thumb";

    (You can add this either directly into the project file or from the build settings tab of the project).

    Please see an apple forum thread explaining the complete issue:

    https://devforums.apple.com/thread/122059?tstart=15

提交回复
热议问题