iphone - 核心动画 : ignoring exception: *** -[NSPlaceholderString initWithString:]: nil argument

标签 iphone objective-c ios xcode

此代码导致错误:

- (NSString *)cachedTwitterOAuthDataForUsername:(NSString *)username
{
    NSString *cache = [NSString stringWithString:[settings objectForKey:@"twitterCache"]];
    if (cache.length > 0)
    {
        twitterLoginShown = YES;
        return cache;       
    }
    return @" ";
}

出于某种原因,我什至无法单步执行此代码块中的每一行。我不太确定错误在问什么。

最佳答案

错误表明 [settings objectForKey:@"twitterCache"] 返回 nil。检查 settings 是否包含 key @"twitterCache" 的值。

关于iphone - 核心动画 : ignoring exception: *** -[NSPlaceholderString initWithString:]: nil argument,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6906941/

相关文章:

iPhone闪耀动画

ios - 如何按降序对日期数组进行排序

ios - UIBezierPath 在上一条路径之上绘制?

iphone - 从 GLPaint 保存 imageRef 会创建全黑图像

iphone - 我可以在我的 AppDelegate 中接收摇动事件吗?

iphone - 在 iOS sdk 中实现 adColony 时出错

objective-c - 应用程序在运行方法一次后崩溃

objective-c - 使用 performSelectorInBackground 的风险?

ios - 放松转场,音频继续播放

iphone - AVAssetWriter 多个 session 和状态属性