Label issue - iOS 16 beta

Does anyone experience this issue on the iOS 16 beta? The word "has" goes to the next line only on the iOS 16 beta.

It is the same label with the same leading and trailing constraints values, the only thing that has changed is the IOS version from 15.5 to 16 beta. This is just a simple example, we have found a lot of cases in our app with the same behavior.

The following image is the digital comparison between the 2 images I put above. As you can see the only difference is the line where the "has" is in the next line.

Accepted Reply

This is expected. TextKit in iOS 16, especially with TextKit 2, includes improved line breaking algorithms designed to help make each line visually balanced in length.

  • Thanks for your reply. How about if I want to maintain the same UI through the iOS version? how can I keep the same look in iOS 15 and iOS 16? We only support iPhone 11 pro in our app and we need to keep "pixel-perfect" looking, it is in our contract with the customer.

  • UITextView @property(nonatomic, readonly) NSLayoutManager *layoutManager API_AVAILABLE(ios(7.0));

    Try it, TextKit 2 to TextKit1

Add a Comment

Replies

This is expected. TextKit in iOS 16, especially with TextKit 2, includes improved line breaking algorithms designed to help make each line visually balanced in length.

  • Thanks for your reply. How about if I want to maintain the same UI through the iOS version? how can I keep the same look in iOS 15 and iOS 16? We only support iPhone 11 pro in our app and we need to keep "pixel-perfect" looking, it is in our contract with the customer.

  • UITextView @property(nonatomic, readonly) NSLayoutManager *layoutManager API_AVAILABLE(ios(7.0));

    Try it, TextKit 2 to TextKit1

Add a Comment