let type = self.data[indexPath.row]["Type"] as? String
但现在我收到这个错误:
Type 'Any' has no subscript members
为什么我收到此错误并修复它?
let type = (self.data[indexPath.row] as? [String : String])?["Type"]
您需要将self.data [indexPath.row]强制转换为字典.