Reputation: 3338
I have a problem when trying to subclass UITableViewCell and creating a xib file that correspond to this class X I have. The steps I did was the same as always.
then instantiated the class like this:
var cell = X()
It craches right there. My traceback looks like this
I don't have a clue of what this is.
Any help?
EDIT:
The only thing I see in the console at the time of the crash is this:
2014-06-24 04:06:51.715 ChemConverter[2261:94363] SetAppThreadPriority: setpriority failed with error 45
which I don't think it's relevant.
EDIT 2:
Declared cell like this
var cell: UITableViewCell? = tableView.dequeueReusableCellWithIdentifier(identifier) as? UITableViewCell
and it worked!
Upvotes: 1
Views: 570
Reputation: 1548
Without an error message or much code to go by, what would happen if you declared your cell variable as optional? Would it crash then? Also, shouldn't you use dequeueReusableCellWithIdentifier(...) to get a reference to your cell?
Upvotes: 1