开发者

Variable is not a CFString error showing

开发者 https://www.devze.com 2023-04-02 18:08 出处:网络
I am getting value from JSON it gives exception var is not CFString. below is the l开发者_StackOverflowink from which i am getting dataI think this question should help you

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消