0
自定义栏按钮我得到的问题,当我使用自定义栏按钮用图像和标题,我用下面的代码用图片和标题
let button = UIButton(type: .system)
button.titleEdgeInsets.left = 5
button.setImage(buttonImg, for: .normal)
button.setTitle(title, for: .normal)
button.sizeToFit()
button.addTarget(self, action: #selector(self.popVC), for: .touchUpInside)
navigationItem.leftBarButtonItem = UIBarButtonItem(customView: button)
而且这是问题所在片段。文字无法清楚地显示
感谢您的答复,但现在使用此代码标题不会出现。 –
我已经更新了我的答案..那个.. – PGDev
我不想修复按钮宽度谢谢 –