segueを使った遷移でエラーが出てしまいます。
エラー内容はReceiver has no segue with identifier 'tap'というエラーです。
segueのidentifierを'tap'として設定してるのですが上記のようなエラーが出てしまいます。
どのようにすれば解決するでしょうか?
よろしくお願いします・
気になる質問をクリップする
クリップした質問は、後からいつでもMYページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
回答1件
0
ベストアンサー
パット見は間違えていない様に見えます。
こちらでも以下の様ななセルからの遷移するプロジェクトで問題無く遷移できました。
一度簡単なプロジェクトで遷移できる事を確認することをオススメします。
※遷移元のViewController
にはNavigationController
が付いてますよね?
swift
1import UIKit 2 3class ViewController: UIViewController, UITableViewDelegate { 4 5 @IBOutlet weak var tableView: UITableView! 6 7 override func viewDidLoad() { 8 super.viewDidLoad() 9 10 tableView.estimatedRowHeight = 20 11 tableView.rowHeight = UITableViewAutomaticDimension 12 } 13 14 // Data Array 15 var dataArray = ["Data1","Data2","Data3","Data4","Data5"] 16 17 // MARK: - TableView Delegate & DataSource 18 19 // Row Count 20 func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 21 return dataArray.count 22 } 23 24 // Generate Cell 25 func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 26 let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) 27 cell.textLabel?.numberOfLines = 0 28 cell.textLabel?.text = dataArray[indexPath.row] 29 return cell 30 } 31} 32 33extension ViewController: UITableViewDataSource { 34 // Select Cell 35 func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 36 tableView.deselectRowAtIndexPath(indexPath, animated: true) 37 performSegueWithIdentifier("tap", sender: self) 38 } 39}
投稿2016/08/07 22:48
総合スコア8490
あなたの回答
tips
太字
斜体
打ち消し線
見出し
引用テキストの挿入
コードの挿入
リンクの挿入
リストの挿入
番号リストの挿入
表の挿入
水平線の挿入
プレビュー
質問の解決につながる回答をしましょう。 サンプルコードなど、より具体的な説明があると質問者の理解の助けになります。 また、読む側のことを考えた、分かりやすい文章を心がけましょう。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/08/08 09:55
2016/08/08 13:18