1

这段代码有什么问题:

NSError *error = nil;

[SFHFKeychainUtils deleteItemForUsername:@"<span class="Apple-style-span" style="font-family: Times; font-size: small;">IAPNoob01</span>" andServiceName:kStoredData error:&error];

错误是:

问题:缺少 [ 在开始消息发送表达式

4

1 回答 1

5

您必须转义字符串中的引号。

NSError *error = nil;

[SFHFKeychainUtils deleteItemForUsername:@"<span class=\"Apple-style-span\" style=\"font-family:Times;
    font-size: small;\">IAPNoob01</span>"
    andServiceName:kStoredData
    error:&error];
于 2012-09-09T16:26:39.460 回答