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

Most upvoted comments

I’m actually making release right now =) I’ll update this issue when it will be ready.