I have response from soap as image_path
(self.posts.value(forKey: "image_path") as! [String])[indexPath.row]
This is my response
i cant convert this response to my url, i want to show this image in my tableViewCell
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
print((self.posts.value(forKey: "image_path") as! [String])[indexPath.row])
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! AlllLocationTableViewCell
let urlString = (self.posts.value(forKey: "image_path") as! [String])[indexPath.row] as String
print("\(urlString)")
let fileUrl = NSURL(fileURLWithPath: (self.posts.value(forKey: "image_path") as! [String])[indexPath.row])
print(fileUrl as Any)
let data = try? Data(contentsOf: fileUrl) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
self.Responseimage = UIImage(data: data!)!
cell.LocationImage?.image = LocationImagView1
return cell as UITableViewCell
}