Ambiguous Reference to Member 'Tableview'

Ambiguous reference to member 'tableView'

You need to declare your tableView up by your other @IBOutlets since you are using a UIViewController and putting a tableView within it's view. Currently the UIViewController doesn't know what tableView you are referring too.

@IBOutlet var tableView: UITableView!

Then link it up in the interface builder as you have done with your other @IBOutlets. Make sure you link the delegate and dataSource properties of your tableView back to the view controller as well.

To do the latter, after you select your tableView, select the Connections Inspector area, as shown in the picture below, and connect them back to your UIViewController.

Sample Image

Ambiguous reference to member 'tableView(_:didSelectRowAt:)' (Swift)

You are missing the @IBOutlet for your tableView. So when you reference self.tableView Swift thinks you are talking about one of the methods that starts with tableView.

So, get rid of this line in searchBar(_:textDidChange:):

let tableView = UITableView()

and add an outlet to your tableView and connect it:

@IBOutlet weak var tableView: UITableView!

Ambiguous reference to member 'tableView(_:numberOfRowsInSection:)'

The problem is that there is nothing in your view controller called self.tableView. Its name is completedCaseTableView. So change this:

if let indexPath = self.tableView.indexPathForSelectedRow {

to this:

if let indexPath = self.completedCaseTableView.indexPathForSelectedRow {

Ambiguous reference to member 'tableView(_:numberOfRowsInSection:)' Why this error?

It's not finding tableView, and is therefore getting thrown off, assuming you somehow meant to reference this method (which you don't, obviously).

Note, your outlet is tableview, not tableView. Properties are case sensitive.

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "show Detail" {
if let indexPath = self.tableview.indexPathForSelectedRow {
let taakDetail : Taak = taken[indexPath.row]
let controller = (segue.destination as! UINavigationController).topViewController as! DetailsViewController
controller.selectedTaak = taakDetail
}
}
}

Ambiguous reference to member 'tableView' when dequeuing a cell

Try changing the line to

let cell = tableView.dequeueReusableCellWithIdentifier("FeedCell", forIndexPath: indexPath) as! FeedCell

Just remove the ! from FeedCell! and put it in as! and check if there is any difference.

Beside as @redent84 mentioned in his comment you should use tableView instead of self.tableView.

Ambiguous reference to member 'tableView' using RxSwift

Found the issue. DefaultReuseIdentifier wasn't defined in the MovieListCell. :)
Funny error message though!

tableView.reloadData() error: Ambiguous reference to member

You don't have an outlet called tableView. Create one, connect it to Interface Builder and you should be fine.



Related Topics



Leave a reply



Submit