IOS 7 NSLineBreakByChar Wrapping Wraps with Incorrect Characters

I encountered a problem with iOS 7. I want to install lineBreakingModefor UILabelin UITableViewCell- NSLineBreakByCharWrapping.

My code is as follows:

self.textLabel.lineBreakMode = NSLineBreakByCharWrapping;
self.textLabel.numberOfLines = 0;

There are special characters in my lines like! $ and appear, but I never use any spaces.

Now I realized that iOS6 displays everything correctly. The text fills the entire line and is wrapped with any character.

In iOS7, the text is wrapped with special characters (! $ &). However, sometimes it looks like this: iOS7 breaks the lines correctly.

I have attached three screenshots showing the results in iOS6 and 7.

Has anyone understood what happened to this?

  • iOS6 (ok):
    s8KiP.png
  • iOS7 (ok)
    LIXR6.png
  • iOS7 (wrong)
    c3S7T.png
+4
source share

Source: https://habr.com/ru/post/1539002/


All Articles