私はタブで作成されたいくつかのセルの画像を持っていますこのビューで別のビュー(moreViewController)に正しい値をセグしてくださいナズワにセルなどから正しい「場所」を教えてください 誰かが何か解決策を持っていますか?私はそれを検索しますが、私は見つけることはありません:/Segue with TableView
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath){
self.performSegue(withIdentifier: "more", sender: tableView)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let destViewController:moreViewController = segue.destination as! moreViewController
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return nazwaTab.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! cellTableViewCell
let nazwa = nazwaTab[indexPath.row]
let szerokosc = szerokoscTab[indexPath.row]
let dlugosc = dlugoscTab[indexPath.row]
cell.nazwaLabel.text = nazwa
cell.szerokoscLabel.text = szerokosc
cell.dlugoscLabel.text = dlugosc
return (cell)
}
にこの
を試してみてください –
問題が明確ではありません。 「ナズワに保存する必要がある」という意味は、セルなどから正しい場所に移動することですか? タップされた画像/タブを取得しますか? – Priyal
Nooo、私はいくつかのセルをクリックすると、このビューにhttps://scr.hu/BL69P4をセグメンテーションする必要がありますが、場所をクリックすると18 "nazwa"が配置されなければなりません18場所をクリックすると18 "nazwa" – k0le