Posts

Post not yet marked as solved
17 Replies
This seems to be a bug.The label width inside the button is taken as small as 1.Try this solution ~!extension UIButton { @objc func adjustTitleInsetsForTextImageButton() { if #available(iOS 13.0, *), ".SFUI-Semibold" == UIFont.systemFont(ofSize: 10).fontName { titleEdgeInsets = UIEdgeInsets(top: titleEdgeInsets.top, left: titleEdgeInsets.left, bottom: titleEdgeInsets.bottom, right: titleEdgeInsets.right - 1) } }}And more simple solutionbutton?.titleLabel?.lineBreakMode = .byClipping