Xcode 6: can't connect any IBOutlet to ViewController

后端 未结 16 1813
眼角桃花
眼角桃花 2020-12-03 07:17

After upgrading to Xcode 6, I opened an old project (that contains a subproject, so it has many targets) and I noticed that no link from my Storyboard ViewContoller to the r

相关标签:
16条回答
  • 2020-12-03 08:04

    Maybe try to delete the outlet from the menu in the storyboard (in your screenshot) and drag it again of the element.

    0 讨论(0)
  • 2020-12-03 08:04

    Okay, let's check iff it is the lack of a module name.

    1. In your storyboard ViewController, type in the name of module. (the project name)

    2.Clcick outside in another field. When you go back to the module field it may say none, but now there will be a dropdown menu entry for your project name.

    1. Select your project name and see if everything is good.

    If there are still issues I will post photos.

    0 讨论(0)
  • 2020-12-03 08:06

    In Xcode 6.3 I needed to close Xcode and restart the Mac. Restarting Xcode alone didn't do it for me.

    I've had 6.3 for a long time and my problem was with new projects I was creating to test some things. Definitely not an upgrade issue this time.

    0 讨论(0)
  • 2020-12-03 08:07

    Seems to be a workspace issue. Try to remove project form a workspace and add it again. It helped in my case.

    0 讨论(0)
  • 2020-12-03 08:09

    Thanks to everyone who commented.

    It is a bug of Xcode 6 / 6.0.1. Downloaded and installed the 6.1 version and the problem disappeared.

    0 讨论(0)
  • 2020-12-03 08:10

    You can also see that the link between the parent view and the custom class is broken (not visible anymore) which is a huge problem.

    I had the exact same issue with the app i'm working on actually, updating XCode from 5.xxx to 6.1. The workaround that worked for me was to remove the reference of every view controller and re-add them to the project...

    To everyone facing that issue, here's the (annoying) trick :

    • Step 1 : select both .h and .m view controller files
    • Step 2 : remove the reference of those files
    • Step 3 : re-add the files to your project tree
    • Step 4 : open the storyboard, eventually re-build the project and smile

    I can understand those things could be reaaally annoying, but it worked for me... Hope it will help someone else !

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