DTTableViewManager: manager.whenSelected not work
I use my custom cell class LabelCell in storyboard This is setup method
func setupTable() {
manager.startManagingWithDelegate(self)
manager.registerCellClass(ParamValueCell.self)
manager.whenSelected(ParamValueCell.self){ postCell, post, indexPath in
print("Selected \(post) in \(postCell) at \(indexPath)")
}
}
I fill cells and they appear in table
but “manager.whenSelected” not work and
print("Selected \(post) in \(postCell) at \(indexPath)")
- never called
In debug seems that fail in next place
func reactionsOfType(type: UIReactionType, forView view: Any) -> [UIReaction] {
....
//fail in this place
reaction.viewClass == unwrappedView.dynamicType.
...
}
My cell class
public struct LabelCellModel {
let labelValue: Variable<String>
}
public class LabelCell: TableViewCell, ModelTransfer {
@IBOutlet weak var label: UILabel!
public func updateWithModel(model: LabelCellModel) {
model.labelValue.asObservable()
.takeUntil(rx_reuse)
.subscribeNext({[weak self] labelText in self?.label.text = labelText })
.addDisposableTo(disposeBag)
}
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (10 by maintainers)
Commits related to this issue
- fix for https://github.com/DenHeadless/DTTableViewManager/issues/34, use Realm in memory to make Realm fine grained notifications tests run correctly — committed to DenTelezhkin/DTModelStorage by DenTelezhkin 8 years ago
I’m actually making release right now =) I’ll update this issue when it will be ready.