[英]Swift 2.2 syntax error: Cannot call value of non-function type 'UITableView!'
I am using to Tab gesture in UITableView cell but following error occur. 我在UITableView单元格中使用Tab手势但发生以下错误。
"Cannot call value of non-function type 'UITableView!'" I am using the following code which I inherited from my previous Objective C project: “无法调用非函数类型的值'UITableView!'”我正在使用以下代码,我从之前的Objective C项目继承而来:
var p: CGPoint = sender.locationInView(self.tableView)
var indexPath: NSIndexPath = self.tableView(forRowAtPoint:p)
var buttonTag: Int = indexPath.row
var selectView = self.storyboard?.instantiateViewControllerWithIdentifier("DropDownSelectionViewController") as? DropDownSelectionViewController
var selectWithNaviBar: UINavigationController = UINavigationController(rootViewController: selectView!)
if (buttonTag == TEAM_ROW) {
getPeoplesWithMenuType(TEAM)
}else{
if (buttonTag == OFFICES_ROW) {
selectView?.menuName = OFFICES_MENU
// selectView?.isMultipleSelection = yes
}else if(buttonTag == CATEGORIES_ROW){
}else if(buttonTag == INTERNAL_GROUPS_ROW){
}
}
I would appreciate if someone could help. 如果有人可以帮忙,我将不胜感激。
This line 这条线
self.tableView(forRowAtPoint:p)
is the source of problems. 是问题的根源。 You probably want self.tableView.indexPathForRowAtPoint(p)
你可能想要self.tableView.indexPathForRowAtPoint(p)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.