Variable is not a CFString error showing
I am getting value from JSON it gives exception var is not CFString. below is the l开发者_StackOverflowink from which i am getting data
I think this question should help you
Replace multiple characters in a string in Objective-C?
CFStringRef aCFString = (CFStringRef)aNSString;
works perfectly and transparently. Likewise:
NSString *aNSString = (NSString *)aCFString;
Check the class of you var using [var isKindOfClass:[NSString class]], if it returns true then assign it to your string variable.
精彩评论