开发者

Variable is not a CFString

Somehow the code below crashes my app:

NSString *filename = [NSString stringWithFormat:@"%@%@", dbPath, @"BAR"];
NSString *dbS = [NSString stringWithFormat:@"%@%@", "@", filename];

I've set a breakpoint at the dbS string and see that it says "variable is not A CFString." First I thought i开发者_StackOverflow中文版t had to do with the at-symbol, however removing it does not help.

Anyone got a clue what's going on?

Thanks!

P.s. dbPath is defined in my header file --> #define dbPath @"FOO"


Second string should look like this:

NSString *dbS = [NSString stringWithFormat:@"@%@", filename];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜