0
이 오류가 계속 발생하여 해결할 수 없지만 누군가 도와 줄 수 있습니까? 폐쇄이며,indexPath 및 테이블보기 오류
func prepare(for segue: UIStoryboardSegue, sender: Any?){
if segue.identifier == "detail" {
let viewController = segue.destination as! DetailNewsController
if let indexPath = tableView.indexPathForSelectedRow {
viewController.news = DownloadManager.sharedInstance.localArra[(indexPath as NSIndexPath).row]
let cella = self.tableView.cellForRow(at: indexPath) as! NewsCell
self.zoomTransition.sourceView = cella
viewController.newsImage = cella.imageNews.image
self.tableView.deselectRow(at: indexPath, animated:true)
}
}
}
어디에서'tableView'가 선언 되었습니까? – rmaddy