How to configure Row which is design on the Storyboard not design with the nib file and this Cell is use for View only so what should be the cell type?
public final class LastLogRow: Row<String, LastLogCell>{
required public init(tag: String?) {
super.init(tag: tag)
}
}
public class LastLogCell : Cell<String>, CellType {
@IBOutlet weak var lblNeckText: UILabel!
@IBOutlet weak var lblNeck: UILabel!
public override func awakeFromNib() {
super.awakeFromNib()
lblNeckText.text = Localizable("NECK")
lblNeck.text = "14"
}
public override func update() {
super.update()
accessoryType = .None
}
public override func setup() {
super.setup()
}
}
With view only you mean the user can not interact with it? For that I would use selectionStyle = .None. And if you do not define anything in its didSelect method then it will basically be view only.
Regarding the Storyboard, Eurekas rows create their cells either from nib file or by instantiating them with init(style:identifier:) so that I do not think you will be able to do that
View only means what should be the Cell type if we don't want to insert or update the value? For e.g. string,bool are used for value and we have to define that after cell
You could subclass LabelCell or LabelCellOf<T> instead of Cell<T> but you do not need to.
Those two cells are useful to 'show information' but you can use a custom cell and display the information as you want.
You can also just subclass Cell<T> as you did in your code.
I do not know what your problem is but if you want to use a nibfile you have to set the cellProvider in your LastLogRow's init method.
@mats-claassen Why in the world would the library couple you to xib usage? With XLForm, it was ridiculously straight forward to add storyboard support. Now the instantiation of the cell is not only inefficient, but it's so abstracted from the VC that making the changes to load from a storyboard is an absolute pain.
Most helpful comment
@mats-claassen Why in the world would the library couple you to xib usage? With XLForm, it was ridiculously straight forward to add storyboard support. Now the instantiation of the cell is not only inefficient, but it's so abstracted from the VC that making the changes to load from a storyboard is an absolute pain.