'Can not find indexpath in scope in tableview
import UIKit
private let reuseableIdentifier = "cell"
class TableViewController: UITableViewController{
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UITableViewCell.self,forCellReuseIdentifier: reuseableIdentifier)
}
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 0
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
let cell = tableView.dequeueReusableCell(withIdentifier: reuseableIdentifier, for: indexPath )
return cell
}
}
So this is my code but at the dequereuseableCell for: indexPath it showing error like can not find indexPath in scope.
Solution 1:[1]
You are still missing one method:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// dequeue your cell here
}
the method you use should read:
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
//return the number of elements to show here
}
Solution 2:[2]
For your packages the preferred way to do this would be through creating a mirror that could then be transferred onto your system.
For the bootstrapping issue checkout Bootstrapping for air gapped systems. This is a newer feature that is essentially creating a mirror specifically for bootstrapping procedures.
It is also worth noting that if you can install clingo on your system's profile through any other means then you won't need to bootstrap it. You run the risk of compatibility issues if you get the wrong version of clingo but it is another option.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | burnsi |
| Solution 2 | pjstack |
