iPadOS 15 UITabBar title cut off
Solution 1:
For some reason, it seems that setting the titleTextAttributes
is what causes the problem to happen with inlineLayoutAppearance
, and including the default paragraph style of NSParagraphStyle.default
fixes it.
For your code, the following changes should fix it (as of iOS 15.0).
let normalAttrs: [NSAttributedString.Key: Any] = [.foregroundColor: ThemeColor.gray, .paragraphStyle: NSParagraphStyle.default]
let selectedAttrs: [NSAttributedString.Key: Any] = [.foregroundColor: ThemeColor.red, .paragraphStyle: NSParagraphStyle.default]