Could not insert new outlet?

729 Views Asked by At

I have just recently begun learning about app development, although I am quite fluent in Java, C and Fortran. I want to make a simple iOS app that just prompts the user to input their name, and when they hit a button a label says Hi [insert name]. I believe I'm going about this the right way although every time I try to link the label to my viewcontroller.h file it gives me this error. I hav gone through so many forums online with people saying they fixed it by deleting the derived data, restarting, reinstalling and what not. I have tried all of those numerous times. I've even uninstalled and reinstalled xcode twice. I was wondering if there are any other problems that could be causing this?

It looks very similar to this:

enter image description here

Thanks

2

There are 2 best solutions below

3
On

Just try that delete your secondviewcontroller and then recreate it.

9
On

enter image description here 1. Close your project. 2. Delete the DerivedData folder of you project. (project's folder, or inside ~/Library/Developer/XCode/DerivedData/(your project)/ ) or somewhere else that were setup by you. 3. restart your project.

Otherwise make sure Have checked the target when you created your second view controller

enter image description here