I currently have a mobile app that brings in a list of items from a JSON file.
The JSON file also has a list of urls attached to each item.
I need to open the URL in Safari when the user touches the item in the list view.
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
cell.textLabel?.text = TableData[indexPath.row]
return cell
}
Does anyone have an idea on how to do this, I can post code to display how I bring in the list of data if necessary.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…