When I deleted xib files for my view controllers, I got this error: "Could not load NIB in bundle...with name 'LibraryViewController'". I referenced this question.
Things I have already done:
- Deleted app from simulator
- Deleted derived data
- Cleaned build folder
- Restarted my computer
- Attempted to clean the contents of
/var/folders
. However, I could not delete the folders 8k, gf, and zz inside/var/folders
because they are required by Mac OS.
Is there any way I can delete my unused xib files without crashing my app?
Update:
override func viewDidLoad() {
libraryTable.register(UINib(nibName: "categoriesTableViewCell", bundle: nil), forCellReuseIdentifier: "categoriesTableViewCell")
}
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "categoriesTableViewCell", for: indexPath) as! categoriesTableViewCell
return cell
} else {
let cell = songTableViewCell()
return cell
}
}