How to declare class attributes in swift, just like UITableViewCell reuse identifiers?
- by martin
I am trying to declare a reuse identifier associated to a UITableView subclass in swift.
From my understanding I would like to declare an class stored property (not an instance one) so i have access via: MyCustomTableCell.ReuseIdentifer.
Here is what I was trying:
class MyCustomTableViewCell : UITableViewCell {
class let ReuseIdentifier = "MyCustomTableViewCellReuseIdentifier"
}
The compiler mentions that class attributes are not supported yet. How to declare such kind of constants associated to a class type in a clean way?