Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/107.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 接收器没有标识符为';联系segue';_Ios_Swift_Segue_Uistoryboardsegue - Fatal编程技术网

Ios 接收器没有标识符为';联系segue';

Ios 接收器没有标识符为';联系segue';,ios,swift,segue,uistoryboardsegue,Ios,Swift,Segue,Uistoryboardsegue,我有一个问题,self.performsguewithidentifier(“contact\u segue”,sender:self)不工作,并抱怨接收方没有标识符为“contact\u segue”的segue即使我有标识符。我已经使用SWReveal框架构建了左侧滑动菜单,该菜单与表视图(类:slidingMenuController)一起使用。单击单元格调用MainNavigationController的函数changeView以更改视图后 import UIKit class Ma

我有一个问题,
self.performsguewithidentifier(“contact\u segue”,sender:self)
不工作,并抱怨接收方没有标识符为“contact\u segue”的segue即使我有标识符。我已经使用SWReveal框架构建了左侧滑动菜单,该菜单与表视图(类:slidingMenuController)一起使用。单击单元格调用MainNavigationController的函数changeView以更改视图后

import UIKit

class MainNavigationController: UINavigationController {

override func viewDidLoad() {
    super.viewDidLoad()


}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}
override func viewDidAppear(animated: Bool){
    super.viewDidAppear(false)
    self.performSegueWithIdentifier("Home", sender: self)
}


override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
    if segue.identifier == "Contact_se" {

    }
}
func changeView(){
       self.performSegueWithIdentifier("contact_segue", sender: self)      
    }
}
由tablecell中的左侧滑动菜单(类:slidingMenuController)调用的changeView:

 override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {

        let selectedItemMenu = arrayOfSlider[indexPath.row]

        let mainNav = MainNavigationController()

         mainNav.changeView()
    }

只需在didSelectRowAtIndexPath上添加此代码
self.performsguewithIdentifier(“contact_segue”,发件人:self)
?我相信这里不需要主导航控制器

也许你是对的,仍在努力,谢谢你的想法。有一个类(slidingMenuController),它是一个左侧滑动菜单。该类调用MainNavigationControlleroh的函数changeView。也许是因为发送者,也许,还在努力。谢谢你的评论。让我检查发送方是否为MainNavigationController或slidingMenuController。