@@ -154,14 +154,6 @@ extension WordListViewController: UITableViewDataSource, UITableViewDelegate {
|
|||||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||||
Haptics.selection()
|
Haptics.selection()
|
||||||
let detail = WordDetailViewController(word: category.words[indexPath.row], categoryName: category.name)
|
let detail = WordDetailViewController(word: category.words[indexPath.row], categoryName: category.name)
|
||||||
detail.preferredTransition = .zoom(options: .init()) { [weak self] _ in
|
|
||||||
guard let self else { return nil }
|
|
||||||
if self.tableView.cellForRow(at: indexPath) == nil {
|
|
||||||
self.tableView.scrollToRow(at: indexPath, at: .middle, animated: false)
|
|
||||||
self.tableView.layoutIfNeeded()
|
|
||||||
}
|
|
||||||
return (self.tableView.cellForRow(at: indexPath) as? WordCardCell)?.zoomSourceView
|
|
||||||
}
|
|
||||||
navigationController?.pushViewController(detail, animated: true)
|
navigationController?.pushViewController(detail, animated: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user