Could not cast value of type 'UITableViewCell' to 'AppName.CustomCellName'
"I have self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "eventCell") in my viewDidLoad"
That's probably overriding the value you set in the storyboard. Try removing this line, or change it to self.tableView.registerClass(EventTableViewCell.self, forCellReuseIdentifier: "eventCell")
.
Could not cast value of type 'UITableViewCell' to 'PFTableViewCell'
Did you change the class of the prototype cell to: PFTableViewCell ?
The identifier only helps you, well, identify the cell on the storyboard for the current table view.
can't set UITableViewCell as a cell
you are using the old decking method, that either rquires you to create the cell or use the new that takes the indexPath
let cell:customCell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath:indexPath) as! customCell
if it is still failing, you need to register the cell, either by setting it up in the storyboard or by registering either a class or a nib file in code.
override func viewDidLoad() {
super.viewDidLoad()
tableView.registerNib(UINib(nibName: "customCell", bundle: nil), forCellReuseIdentifier: "cell")
}
or
override func viewDidLoad() {
super.viewDidLoad()
self.tableView.registerClass(customCell.self, forCellReuseIdentifier: "cell")
}
Related Topics
iOS Check If Application Has Access to Microphone
Xcode Error While Validation - "Your Binary Is Not Optimized for iPhone 5"
What Do the "M" and "A" Icons in the Project Navigator of Xcode 4 Mean When I Create a New Project
React Native Xcode Project Product Archive Fails with Duplicate Symbols for Architecture Arm64
How to Completely Hide the Status Bar in iOS Using Cordova
Add a Child View Controller's View to a Subview of the Parent View Controller
Swift 3 - How to Make Timer Work in Background
Open Links in Safari Instead of Uiwebview
Exclude Pod When Porting to MAC with Catalyst
How Detect Swipe Gesture Direction
Add Cocoapods to Tests Target Too
Rotation Only in One Viewcontroller
How to Convert Uicolor Value to a Named Color String
Memory Leak When Using Nsurlsession.Downloadtaskwithurl