Could not insert new outlet connection error

后端 未结 21 1383
南方客
南方客 2020-12-14 01:29

I have created a custom cell for loading into a table. The interface is complete and now I am trying to link the xib and the class.

I have the split screen view open

相关标签:
21条回答
  • 2020-12-14 02:16

    I used xCode 7 and iOS 9.

    in your .m

    delete #import "VC.h"

    save .m and link your outlet again it work fine.

    0 讨论(0)
  • 2020-12-14 02:17

    For me restarting Xcode did not work, I just deleted the object and added again then started working.

    0 讨论(0)
  • 2020-12-14 02:19

    So, it turns out that I was being a fool. You can't quite do it like this with Xcode. If you create the properties manually in the header file, then synthesise them in the class file, you can then link by doing the following:

    Open the xib file Right click on the cell in the "Objects" panel Click and drag from the options here to the objects on the xib.

    That's all there was to it.

    0 讨论(0)
  • 2020-12-14 02:22

    I fixed this issue by deleting the .m file (reference only) then adding it back in to the project. I think XCode gets corrupted at times (and I'm on the latest 4.6).

    0 讨论(0)
  • 2020-12-14 02:22

    The problem could be caused by other errors. Build the program, if there are any errors or warnings, fix it. Then ctrl-drag to insert outlet again and the problem will go away.

    0 讨论(0)
  • 2020-12-14 02:22

    I had another window of Xcode opened up for another project and the simulator was also running. I just closed both of them and Product-> Clean my current application. It works.

    0 讨论(0)
提交回复
热议问题