在iOS 11之前,为了制作自定义标签,我只是这样做了:
let titleLabel = UILabel(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: 40))
titleLabel.text = self.customTitleText
titleLabel.backgroundColor = .clear
titleLabel.textAlignment = .left
titleLabel.textColor = .white
titleLabel.font = UIFont.boldSystemFont(ofSize: 17)
titleLabel.adjustsFontSizeToFitWidth = true
titleLabel.minimumScaleFactor = 0.25
navigationItem.titleView = titleLabel
现在,titleView似乎不会影响大标题。如何在iOS 11中实现文本缩小?
答案 0 :(得分:0)
您可以这样使用:
tns doctor