Can't connect IBAction in Xcode

前端 未结 12 1584

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:09

    My solution was to delete the UIButton from the .xib file and to add it again. Looks like something strange is happening in the .xib file, readding it should be a quick fix.

提交回复
热议问题