0
我在準備Segue公司一個問題,當我嘗試小區標題添加到導航項目這個問題似乎不能使用覆蓋FUNC prepareForSegue(>>細胞標題導航項目<<)
func tableView(tableView: UITableView, willSelectRowAtIndexPath indexPath: NSIndexPath) -> NSIndexPath? {
self.performSegueWithIdentifier("indeaa", sender: tableView)
return indexPath
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?){
if segue.identifier == "indeaa"
{
let vc = segue.destinationViewController as UIViewController
let indexpath:NSIndexPath = tableaa.indexPathForSelectedRow!
vc.title = arr[indexpath.row]
}
}
}
的問題是解決了,但出現了另一個問題 –
當我在小區1上單擊顯示第一導航欄是空的,當我返回並點擊花葯(細胞) 我顯示細胞1的名稱,當我點擊任何細胞時,我顯示的名稱爲 (花葯(細胞)) –