Please help - this is driving me crazy... I have a number of lines of code very similar but all of a sudden Xcode has started to think that some of the lines are errors and I can't build my app. Here is some extract code:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
cycleSettingsDate = [defaults objectForKey:kCycleSinceDateKey];
cycleUnitFactor = [defaults boolForKey:kCycleUseMilesKey]? @"1.6" : @"1";
runUnitFactor = [defaults boolForKey:kRunUseMilesKey]? @"1.6" : @"1";
swimSettingsDate = [defaults objectForKey:kSwimSinceDateKey];
The item kCycleSinceDateKey is coloured pale blue as if it were a declared property in my header file like cycleSettingsDate - which it is not. The other three are coloured brown as you would expect a key to be colour-coded and they work perfectly. Only kCycleSinceDateKey does not work as expected.
I have the following in my header file which is an exact match with the plist identifier that it relates to:
#define kCycleSinceDate @"cyclesincedate"
#define kSwimSinceDateKey @"swimsincedate"
#define kRunUseMilesKey @"runusemiles"
#define kCycleUseMilesKey @"cycleusemiles"
I have exited Xcode and even restarted my mac for good measure but kCycleSinceDateKey is still underlined with the dotted red line and the same issue. Does anybody have any ideas?
Many thanks in advance...