Can't connect IBAction in Xcode

前端 未结 12 1557

When I drag from a button on the storyboard to my view controller Swift file, I only get the option to insert an Outlet or Outlet Collection.

Similarly, if I create the

12条回答
  •  [愿得一人]
    2021-02-02 13:33

    For me, it was a FUIButton (custom from SAP Fiori) causing same issue. No pods or UIButton extension specified in my own code (in addition to SAP UIButton obviously). Cmd + Alt + Shift + K, DerivedData Clean didn't help either. @IBAction wasn't available in Interface Builder till I changed my Button Class back to simple UIButton.

    And... voila! ta-da!

提交回复
热议问题