When trying to Parse the XML file from remote web server, I can parse the data from XML file successfully. From the XML file i tried to retrieve an image URL and assign it to a UIImageView for a view controller. here am getting the following Error,
-
ARC Semantic Issue: No known class method for selector 'imageWithContentsOfUrl:' -
Sematic Issue: Incompatible pointer types sending 'NSURL *__strong' to parameter of type 'NSString *'
Below is my code,
//My View Controller
[super viewDidLoad];
NSURL *url = [NSURL URLWithString:@"http://sample.com/Products.xml"];
EGSParser *parser = [[EGSParser alloc] init];
// Error in below line( here firstImage is a UIImageView property)
self.firstImage.image = [UIImage imageWithContentsOfUrl:[NSURL URLWithString:url]];
if ([parser loadXMLByURL:url]) {
NSLog(@"success; products=%@",parser.products);
self.xmlProductsResults = parser.products;
}
else
{
NSLog(@"Log Fail");
}
Kindly Suggest me an idea to solve this.
Try this :-
Replace
with
Hope it helps you..