I'm trying to get some data from an array and print it on a UILabel in Xcode, but I get the warning:
Incompatible pointer types assigning to 'NSString *' from 'NSArray *'
Here is my code:
NSError *myError = nil;
NSDictionary *res = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableLeaves error:&myError];
NSArray *results = [res objectForKey:@"current_observation"];
NSArray *cur = [results valueForKey:@"weather"];
NSArray *tmp = [results valueForKey:@"temp_c"];
NSLog(@"Current conditions: %@, %@º", cur, tmp);
temp.text = (@"%@", tmp);
descriptionmethod should never be used to show the result to the user. Thedescriptionmethod is only to be used for debugging purposes. The output of thedescriptionmethod for any class is rarely documented and could change in the future.