4
はここでエラーが表示されている私のコードです: エラーが3行にある「indexpath許可すれば...」メンバー 'tableView(_:numberOfRowsInSection :)'へのあいまいな参照なぜこのエラー?
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "show Detail" {
if let indexPath = self.tableView.indexPathForSelectedRow {
let taakDetail : Taak = taken[(indexPath as NSIndexPath).row]
let controller = (segue.destination as! UINavigationController).topViewController as! DetailsViewController
controller.selectedTaak = taakDetail
}
}
私はこのことについてあいまいであるかを調べることができません。それが参照するコードは次のとおりです。
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return taken.count
}
変数の定義方法を教えてください。 – Sulthan
[取得中にエラーが発生する可能性がありますtableView(\ _:numberOfRowsInSection:)の曖昧な使用](http://stackoverflow.com/questions/32396838/getting-error-ambiguous-use-of-tableview-numberofrowsinsection) – alexburtnik
私のIBOutlet = '@IBOutlet weak tableview:UITableView! ' –