0

This is probably a repeated question but I was dealing with the solutions posted here without any luck. This is what I have.

  1. I've added two folders to my project, one of them is containing my ViewController.h and ViewController.m added by default. (I've removed the references first.).
  2. I was trying to add a Outlet or Action but, First the storyboard did not recognize the class and Second (After set the controller manually) it's fired me this error.

enter image description here

napstercake
  • 1,815
  • 6
  • 32
  • 57
  • 1
    Am I seeing this correct that the class for your view is called ViewController? Kind of strange, isn't it? – dasdom Jul 30 '13 at 17:42
  • 1
    just to clarify: none of these work? http://msmvps.com/blogs/kevinmcneish/archive/2013/04/25/q-amp-a-how-do-i-fix-the-quot-could-not-insert-new-outlet-connection-quot-error.aspx – katzenhut Jul 30 '13 at 17:44
  • @dasdom - i saw thet too, but it should not be a problem, since the System Class is UIViewController. Actually, this is probably because the OP didnt specify his own Prefix, so he just gets ViewContoller (instead of XYViewController)... – katzenhut Jul 30 '13 at 17:46
  • 1
    But Xcode don't give you ViewController when you create a subclass of UIView. Maybe the names of the directories are misleading. It's just, if you start to be sloppy with your names the project is doomed. At leased this is what I experienced. – dasdom Jul 30 '13 at 17:49
  • nope @katzenhut I've tried before and is not working. :( – napstercake Jul 30 '13 at 17:52
  • @dasdom - i completely agree, and i share your experience (and pain) with ignoring naming conventions. But im guessing hes really inheriting from UIViewcontroller, and the directory name is wrong. – katzenhut Jul 30 '13 at 17:54
  • Hi @dasdom sadly is not the name. – napstercake Jul 30 '13 at 17:54
  • This could make a cue. Here in this computer when I add new files the folder are blue. It Seems like is not part of the project or something but when I tried in my other laptop the added folder are yellow and everything is ok. I have the xCode updated. – napstercake Jul 30 '13 at 17:57
  • the color indicates whether you have a group (a virtual folder in xcode) or a folder reference (a link to a folder on your disk), if this confuses you, read up on this:http://majicjungle.com/blog/123/ it might actually solve your problem... – katzenhut Jul 30 '13 at 18:02
  • possible duplicate of [Xcode 4: Creating a UIView xib, not properly connecting](http://stackoverflow.com/questions/6703054/xcode-4-creating-a-uiview-xib-not-properly-connecting) – Max MacLeod May 22 '15 at 14:32

1 Answers1

1

Im pretty sure now that i found the prblem in my last comment. you have those files imported as folder references in one project, and as groups on your laptop. Delete the files on the non-laptop, completely. chose "move to trash" when asked. back hem up somewhere else first if you have to. then import them again, and in the dialogue make sure you dont add it as a folder reference. its a little checkbox in that dialogue. read this for further guidance: http://majicjungle.com/blog/123/

EDIT: i found a screenshot. Note that you can choose to "create froups for any added folders" or "create folder references for any added folders". choose the groups-option.

enter image description here

katzenhut
  • 1,742
  • 18
  • 26