【发布时间】:2018-03-19 02:26:40
【问题描述】:
我在一个表格 (UITableView) 中有四个单元格,第一个和第二个单元格将我带到一个“ViewController”,下面的代码非常适合我。
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let segueIdentifier: String
switch indexPath.row {
case 0: //for first cell
segueIdentifier = "ubicacion"
case 1: //for second cell
segueIdentifier = "companias"
case 3: // For third cell
// Open un link using SFSafariViewController
default: //For fourth cell
// call phone
}
self.performSegue(withIdentifier: segueIdentifier, sender: self)
}
我的问题是关于第三个和第四个单元格,我如何发送操作?
第三个单元格:您必须使用“SFSafariViewController”打开一个链接
第四个:点击时必须拨打指定号码。
如果你能指导我,我将不胜感激
【问题讨论】: