i have an rss feed that pulls in three weather images (sky, temp, and wind) They are all done exactly the same but the wind image doesn't appear. Part of the code i have for displaying the images is as follows:
NSLog(@"%@",[results valueForKeyPath:@"weather.hour.image_names.wind_dir.text" ]);
skyImage.image = [UIImage imageNamed:[results valueForKeyPath:@"weather.hour.image_names.sky_img.text" ]];
tempImage.image = [UIImage imageNamed:[results valueForKeyPath:@"weather.hour.image_names.temp_img.text" ]];
windImage.image = [UIImage imageNamed:[results valueForKeyPath:@"weather.hour.image_names.wind_dir.text" ]];
The wind images are titled as follows "windN.gif", "windNE.gif: respectively for all directions.The rss feed sends the wind image title in the exact same format.
I have changed the above code as follows and it doesnt work:
NSLog(@"%@",[results valueForKeyPath:@"weather.hour.image_names.wind_dir.text" ]);
skyImage.image = [UIImage imageNamed:[results valueForKeyPath:@"weather.hour.image_names.sky_img.text" ]];
tempImage.image = [UIImage imageNamed:[results valueForKeyPath:@"weather.hour.image_names.temp_img.text" ]];
windImage.image = [UIImage imageNamed:@"windN.gif"];
but when i change the title of the wind image to "windn.gif" in the above code it displays my image perfectly.I have all the images saved with caps for the direction and they were added in with the same title format. Does anyone have any ideas on this peculiar problem? I also cannot get the rss feed changed to have no caps in its title format.
If
[UIImage imageNamed:@"windN.gif"]returns nil and[UIImage imageNamed:@"windn.gif"]returns the actual image, it means that the image is saved as windn.gif.Try this:
Regards.