不知何故,下面的代码让我的应用崩溃了:
NSString *filename = [NSString stringWithFormat:@"%@%@", dbPath, @"BAR"];
NSString *dbS = [NSString stringWithFormat:@"%@%@", "@", filename];我在变量字符串上设置了一个断点,并看到它显示“dbS is not A CFString”。首先,我认为它与at-符号有关,但是删除它并没有什么帮助。
有人知道这是怎么回事吗?
谢谢!
附注:在我的头文件中定义了dbPath --> #define dbPath @"FOO“
发布于 2011-08-04 15:12:08
第二个字符串应如下所示:
NSString *dbS = [NSString stringWithFormat:@"@%@", filename];https://stackoverflow.com/questions/6937366
复制相似问题