Selector in swift3

后端 未结 4 1902
悲&欢浪女
悲&欢浪女 2020-11-30 03:23

Why doesn\'t this work in swift 3 ? It crashes at runtime saying:

\'-[my_app_name.displayOtherAppsCtrl tap:]: unrecognized selector sent to instanc

4条回答
  •  暖寄归人
    2020-11-30 04:26

    Swift 3 came with new syntax so instead of using Selector("tap:"), #selector(tap(gestureReconizer:)) is

提交回复
热议问题