Can't connect IBAction in Xcode

前端 未结 12 1586

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

    I was having the same issue but it was because I was trying to connect an ImageView to an IBAction (forgive me, not sure if my terminology is correct). I deleted the ImageView object and replaced it with a Button and IBAction then became an option rather than just IBOutlet and Outlet Collection.

提交回复
热议问题