I am trying to write a UITableView RAC3 helper helper in swift 2.
I am trying to initialize my binding helper that has a signature init(tableView: UITableView, sourceSignal: SignalProducer<[T], NoError>, reuseIdentifier: String, selectionCommand: (() -> Void)? = nil)
My code self.bindingHelper = TableViewBindingHelper<PostCellViewModel>(tableView: tableView, sourceSignal: viewModel.posts.producer, reuseIdentifier: R.reuseIdentifier.contactReuseIdentifier.identifier)
I get a compiler error on sourceSignal: viewModel.posts.producer
saying that Cannot convert value of type 'SignalProducer<[PostCellViewModel], NoError>' (aka 'SignalProducer<Array<PostCellViewModel>, NoError>') to expected argument type 'SignalProducer<[_], NoError>' (aka 'SignalProducer<Array<_>, NoError>')
that doesn't make sense ...
They say he expects SignalProducer<[_], NoError>
. I assumed that _ means it doesn't care what type I pass, but then I try to pass an array from PostCellViewModel
, does it fail?
source
share