Reputation: 109
I am using to Tab gesture in UITableView cell but following error occur.
"Cannot call value of non-function type 'UITableView!'" I am using the following code which I inherited from my previous Objective C project:
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.
Upvotes: 3
Views: 2784
Reputation: 4198
This line
self.tableView(forRowAtPoint:p)
is the source of problems.
You probably want self.tableView.indexPathForRowAtPoint(p)
Upvotes: 3