Syntax Coloring Gone. . .

Discussion in 'iOS Programming' started by ahan.tm, Dec 2, 2012.

  1. ahan.tm macrumors regular

    Joined:
    Jun 26, 2011
    Location:
    Florida
    #1
    Hi,

    I am using Xcode 4.5.2, and just like that, all my syntax coloring disappeared. It was working just the other day, and today it is all gone :(:( !

    Does anybody know of a good fix?

    Thanks!
     
  2. Ides macrumors member

    Joined:
    Mar 27, 2012
    #2
    Have you tried restarting Xcode? I'm using an older version than you are but it behaves weird too sometimes (such as autocompletion randomly stopping). I just save my project, quit xcode and reopen it and it is just fine.
     
  3. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    In the menu bar:

    Xcode > Preferences > Fonts & Colors. What theme are you using? Try a different one. Low Key and Printing are both terrible themes for noticing syntax coloring. I like Default, personally.
     
  4. CodeBreaker macrumors 6502

    Joined:
    Nov 5, 2010
    Location:
    Sea of Tranquility
    #4
    Go to ~/Library/Developer/Xcode/DerivedData/ and delete all folders in it.
     
  5. ahan.tm thread starter macrumors regular

    Joined:
    Jun 26, 2011
    Location:
    Florida
    #5
    Hi,

    Thanks for your responses! I am using the Dusk theme. Normally, the methods are blue, but now they are white.

    I also deleted the DervivedData folder, but it did not help.

    Any other suggestions?

    Thanks!:)
     
  6. CodeBreaker macrumors 6502

    Joined:
    Nov 5, 2010
    Location:
    Sea of Tranquility
    #6
    Does your project build correctly?
     
  7. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #7
    In the window where you pick the theme, do the colors look correct there? Have you tried slightly modifying the theme and seeing what happens?
     
  8. ahan.tm thread starter macrumors regular

    Joined:
    Jun 26, 2011
    Location:
    Florida
    #8
    Hi,

    My project does build normally and when I try changing the colors, it does not fix the problem.

    I was reading online and saw some posts about a misplaced .pch file.

    Anybody else had a similar experience??

    Thanks! :)
     
  9. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #9
    I just reboot Xcode or pc, that mostly helps it, and do a clean (command shift K) & a derived data removal, it's mostly fixed then
     
  10. CodeBreaker macrumors 6502

    Joined:
    Nov 5, 2010
    Location:
    Sea of Tranquility
    #10
    Hmm, a .pch may cause problems, but if it is misplaced, your project won't build at all. Have you modified your .pch in any way? If you have, check the order in which you are importing your headers.

    Also check the order of compile sources. Generally, classes that are imported in other classes should be at the top.

    But these problems occur rarely.
     

Share This Page