Xcode Capitalizes #import
About 500 times every day, Xcode corrects #import
to #Import
(the latter being wrong). This is maddening, a开发者_开发技巧nd I don't want to shut off capitalization autocorrection system-wide. Is there a setting in Xcode?
My guess is that there's some existing code in the project -- somewhere that's included everywhere like main.m
or YourProjectName_Prefix.pch
, or in some class you're including nearly everywhere -- that has #Import
in it with the capital I
. As a result Code Sense is offering it as its first option.
Try a Textual Project Find for #Import
with Ignore case unchecked and see if you can find it.
If not then it's possible that the Code Sense cache is referencing something that no longer exists. From the Build menu choose Clean All Targets, which should recreate the cache. EDITED TO ADD Rebuilding the index actually requires going to Project Settings, choosing the General tab, and clicking the Rebuild Code Sense Index button.
Ahah. You are using Xcode 4.0, aren't you? (Just a note that since it hasn't been released publicly, we are actually breaking our NDA by talking about it).
Since Xcode 4.0 is still very much in-the-works, they haven't disabled that feature of the spell checker. The option to autocorrect spelling isn't even present in Xcode 3.x.
I'd consider this a bug in Xcode 4 that needs to be addressed; you could file a radar if you like: http://bugreport.apple.com/
精彩评论