Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS7 moves all UILabels down

When I'm building my iPhone app for iOS7 all UILabels are moved a little bit downwards. It's just a few points, but all texts are not correctly aligned anymore. If I test on a iOS6 device everything is fine. Is there an easy fix for this or do I have to specify the iOS6/iOS7 deltas in my storyboards and specify positions for iOS6 and iOS7 in my code?

Here is a comparison how it looks like, this happens across the whole application. Thanks a lot for your help!

iOS6/iOS7 UILabel offsets

like image 402
Hannes Avatar asked Nov 02 '22 13:11

Hannes


1 Answers

I just found the answer to my problem. Turns out that my custom font had wrong ascender and descender metrics. Thanks to the guys at kintek there is an easy solution for that: scroll down to "Fonts" and follow those steps

Now the UILabels are still moved down, but the same amount in iOS6 and iOS7. Now I only have to layout all my UILabels correctly and it works in both Versions. If I had that solution from the beginning, no extra work would be needed now.

like image 136
Hannes Avatar answered Nov 08 '22 06:11

Hannes