【发布时间】:2014-05-30 13:59:03
【问题描述】:
这是我的代码:
TableViewController.h
@interface TableViewController : UITableViewController
@property (nonatomic, strong) NSArray *blogPosts;
@end
TableViewController.m
- (void)viewDidLoad
{
[super viewDidLoad];
NSURL *blogURL = [NSURL URLWithString:@"http://blog.teamtreehouse.com/api/get_recent_summary/"];
NSData *jsonData = [NSData dataWithContentsOfURL:blogURL];
NSError *error = nil;
NSDictionary *dataDictionary = [NSJSONSerialization JSONObjectWithData:jsonData
options:0 error:&error];
self.blogPosts = [dataDictionary objectForKey:@"posts"];
}
在日志中显示此内容
2014-04-15 20:21:48.884 BlogReader[772:60b] 找不到 CFBundle 0xa181ef0 的可执行文件(未加载)
【问题讨论】:
-
你确定这发生在这段代码中吗?能不能一步步调试,把出错的那行代码发过来?
-
检查一下我想这是你的问题:[回答链接][1] [1]:stackoverflow.com/questions/18888059/…
标签: ios json uitableview