UIControlState.Normal is Unavailable

后端 未结 4 489
广开言路
广开言路 2020-12-06 05:56

Previously for UIButton instances, you were able to pass in UIControlState.Normal for setTitle or setImage. .Norma

4条回答
  •  失恋的感觉
    2020-12-06 06:19

    Swift 5

    Replace from

    btn.setTitle("title", for: .Normal)
    

    to

    btn.setTitle("title", for: UIControl.State.normal)
    

提交回复
热议问题