UIButton in Swift is not registering touches

后端 未结 18 897
情深已故
情深已故 2020-12-29 21:11

I\'m trying to create a UIButton using Swift. It compiles fine and I can see my button in the simulator, but when I click it, nothing happens. This is the code I am using:

18条回答
  •  伪装坚强ぢ
    2020-12-29 21:33

    Make sure you link you button with your IBOutlet instance variable in your code if you're using storyboard.

提交回复
热议问题