Font style gets changed issue in Xcode 11 Beta

As per Apple's official document https://developer.apple.com/fonts/

SF Pro:

This sans-serif typeface is the system font for iOS, macOS, and tvOS, and includes a rounded variant. It provides a consistent, legible, and friendly typographic voice.

SF Compact:

This sans-serif typeface is the system font for watchOS, and includes a rounded variant. It suits a wide range of content and is easily legible in a variety of contexts.

So we need to download and install SF Pro font and set UILabel attributed string font style with SF Pro Text Regular 18.0 to keep the same font style like Plain text have.

Hope this will help you!

Cheers!


It looks like that starting from iOS13 and XCode 11 Apple changed the system font for attributed string to this new, serif, Times-like font :(

(See also here)

I'm not sure if this was intentional or this is a bug in iOS. I do an ugly workaround to handle this problem:

UIFont *font = [UIFont systemFontOfSize:[UIFont systemFontSize]];
if (@available(iOS 13, *)) {
    font = [UIFont fontWithName:@"SFUI-Regular" size:[UIFont systemFontSize]];
}