PDA

View Full Version : stringByReplacingOccurencesOfString is unrecognized




gggTony
Nov 17, 2008, 10:23 PM
When I use stringByReplacingOccurrencesOfString, xcode always complains that NSString may not respond to "-stringByReplacingOccurrencesOfString:::". But the method substringWithRange has no problem.

Some other method, e.g. performSelectorOnMainThread, xcode also complains that NSObject may not respond to it.

It seems that all above methods are declared under
#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
...
#endif

Is something wrong in the configuration? I use iphone SDK 2.1 default configuration.

Does anyone have such issue?