“Unrecognized selector sent to instance” in swift

后端 未结 10 498
刺人心
刺人心 2020-12-10 10:36

I have no idea what I am doing wrong. I am also quite new to programming so I am not very good at debugging. This was a test app so that I can see how swift ties in with app

10条回答
  •  执笔经年
    2020-12-10 11:10

    If you have a colon in the selector name (buttonAction:) you have to have the sender as a n argument for the buttonAction function, if you don't have any colon in the name the sender will not be sent.

提交回复
热议问题