Can't connect IBAction in Xcode

前端 未结 12 1554

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

    This apparently is a known issue on the Apple forums, but I don't know if Apple is working on it:

    https://forums.developer.apple.com/message/216258

    Here is what I did for a workaround.

    1. Go into my Podfile and comment out the pod library (in my case, ReactiveKit Bond) that is doing an extension causing the issue.
    2. Do a pod update to remove the pod from the project.
    3. Go back in and do my IBAction connections in IB like I normally would. Do as many together as possible for efficiency.
    4. Finally go back and uncomment your pod library and do another pod update to reimport the pods.
    5. Test by setting a breakpoint in your new IBAction functions to verify your connections are working.

提交回复
热议问题