JohnWickham
JohnWickham

Reputation: 561

Xcode lost it's code sense?

For some reason my Xcode project doesn't recognize (autocorrect) my code. It doesn't color-code text except for NSStrings (in red). It doesn't autofill things like it used to (e.g. if I would type "CGR" it would put in "CGRectMake:(x,y,width,height)" but not anymore. I don't remember at what point this started happening but it does work in my other projects. Any ideas?

BTW, deleting the derived data doesn't fix it. Nor does creating a new project and importing the files.

Upvotes: 1

Views: 186

Answers (3)

JohnWickham
JohnWickham

Reputation: 561

Hah, figured it out! For some reason my project was split up in different folders. I.E. it was one folder with all the images, another with ViewController.h and another with ViewController.m. Moved all the files to the highest folder in the hierarchy and everything works great :) Thanks for all your help though!

Upvotes: 1

lijinma
lijinma

Reputation: 2942

this issue has happened to me, I give you 3 sulutions, you can try them.

Solution 1:

  1. Open xcode;
  2. Open Organizer (Xcode-> Window-> Organizer-> Projects)
  3. Select your project and right click, then remove from Organize...
  4. Close xcode and reopen your project.

Solution 2:

  1. Open your project.
  2. Targets -> Building Settings, set Precompile Prefix Header = NO;
  3. repeat solution 1 (Sometimes the Precompile Prefix Header occurs a issue).

Solution 3:

  1. Using commandline.
  2. cd YourProject.xcode
  3. Delete items except project.pbxproj

Good luck.

Upvotes: 2

MaxGabriel
MaxGabriel

Reputation: 7705

I suppose it would be too easy for your text editing preferences to be wrong? Command-comma -> text editing.

Upvotes: 0

Related Questions