UIbutton is not highlighting when pressed

前端 未结 2 1941
你的背包
你的背包 2021-01-07 20:33

My UIButton instance is not highlighting when pressed. I\'m pretty sure my code is correct. This only happens in this specific class that I am using. I\'m guess

2条回答
  •  心在旅途
    2021-01-07 21:00

    Your code is correct except this line let backButton = UIButton(). Here you need to say button Type. Either you can init with Frame or Button Type

提交回复
热议问题