Commit 3a503c53 authored by pete谢兆麟's avatar pete谢兆麟

崩溃提前阻断

parent d04078c6
......@@ -185,7 +185,8 @@ extension YHCompanySelectViewController: UITableViewDelegate, UITableViewDataSou
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHCompanyTableViewCell.self)
let newString = searchDataSource?[indexPath.row].company_name?.highlighted(keyWords: searchView.text, highlightColor: UIColor.brandMainColor)
guard let model = searchDataSource, model.count > indexPath.row else { return cell }
let newString = model[indexPath.row].company_name?.highlighted(keyWords: searchView.text, highlightColor: UIColor.brandMainColor)
cell.titleLabel.attributedText = newString
return cell
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment