尝试UILabel
使用NSString
. NSString
在console
作品上表现相同。
-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
if (self.connectionData)
{
NSError *error;
self.dict = [NSJSONSerialization JSONObjectWithData:self.connectionData options:kNilOptions error:&error];
self.matchesArray = self.dict[@"matches"];
NSString *title = [self.matchesArray valueForKey:@"title"];
NSLog(@"NSString TITLE contains: %@", title);
self.titleLabel.text = title;
}
}
控制台输出:
2013-01-16 13:54:08.550 ZEITreisen[3168:c07] NSString TITLE contains: (
"Mark und Dollar"
)
2013-01-16 13:54:08.552 ZEITreisen[3168:c07] -[__NSArrayI isEqualToString:]: unrecognized selector sent to instance 0xde93850
(lldb)