我花了几个小时才发现button.setTitle(buttonTitle,for:[.normal,.selected])不同于:button.setTitle(buttonTitle,for:.normal)button.setTitle(buttonTitle,for:.selected)当在setTitle函数中使用多个UIControlState时,我的标题永远不会显示,并且在我checkout它们时被设置为nil。有一些方法可以从titleLabel访问它们,但是通过大量的故障排除,结果非常奇怪。我用titleLabel、currentTitle、isHidden、isSe