Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.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 tableView:DidSelectRowatineXpath失败_Ios_Swift3 - Fatal编程技术网

Ios tableView:DidSelectRowatineXpath失败

Ios tableView:DidSelectRowatineXpath失败,ios,swift3,Ios,Swift3,我的tableView:didSelectRowAtIndexPath的实现不起作用。 另一方面,刷卡的实现不起作用。 我想在单击表行时显示另一页 这是我的代码: func tableView(_ tableView: UITableView, didSelectRowAtIndexPath indexPath: IndexPath) { let tableCell: SearchTableViewCell = tableView.dequeueReusableCell(withI

我的
tableView:didSelectRowAtIndexPath的实现不起作用。
另一方面,刷卡的实现不起作用。
我想在单击表行时显示另一页

这是我的代码:

func tableView(_ tableView: UITableView, didSelectRowAtIndexPath indexPath: IndexPath) {


    let  tableCell: SearchTableViewCell = tableView.dequeueReusableCell(withIdentifier: "searchcell") as! SearchTableViewCell


    if(self.searchstatus == "people")
    {
        if(useridarray.object(at: (indexPath as NSIndexPath).row) as! NSString != "null" )
        {

            self.searchdelegate.otheruserid=useridarray.object(at: (indexPath as NSIndexPath).row) as! NSString;
            let ProfilePageViewController = self.storyboard?.instantiateViewController(withIdentifier: "otherprofile")
            self.present(ProfilePageViewController!, animated: false, completion: nil)
        }
    }
    else
    {
        if(useridarray.object(at: (indexPath as NSIndexPath).row) as! NSString != "null")
        {
            let hashtag1=search.text!.replacingOccurrences(of: "#", with: "")
            self.searchdelegate.hashtag="\(hashtag1)" as NSString!
            self.searchdelegate.hashtag=searchdelegate.hashtag.trimmingCharacters(in: CharacterSet.whitespaces) as NSString!
            self.searchdelegate.hashtag=searchdelegate.hashtag.replacingPercentEscapes(using: String.Encoding.utf8.rawValue) as NSString!
            let hashtag = self.storyboard?.instantiateViewController(withIdentifier: "hashtag")
            self.present(hashtag!, animated: false, completion: nil)
        }

    }

}

使用此方法,它是swift3.0

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
 }

使用swift3.0版的此方法

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
 }

替换didSelectRowAtIndexPath并使用didSelectRowAt(swift3.0)替换didSelectRowAtIndexPath并使用didSelectRowAt(swift3.0)Mouni。。。请检查您的tableView选择是否设置为false。。。。在您的视图中添加这些行并加载tableView.AllowSelection=true;好的,穆尼,我想看看你的代码,你也应该检查你的故事板,好像有禁用选择storyboard@shafi我的代码是上面的问题。。。我选择的故事板是我的dabledata@shafi在我的代码中,我修复了断点,但选择的方法并不能使其完整。@mouni您使用的是哪种方法?请在此发表评论。。。请检查您的tableView选择是否设置为false。。。。在您的视图中添加这些行并加载tableView.AllowSelection=true;好的,穆尼,我想看看你的代码,你也应该检查你的故事板,好像有禁用选择storyboard@shafi我的代码是上面的问题。。。我选择的故事板是我的dabledata@shafi在我的代码中,我修复了断点,但选择的方法并不能使其完整。@mouni您使用的是哪种方法?请在此发表评论