-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with rx_subscribeRowsToCellWithIdentifier #20
Comments
Agreed, this should be fixed. |
I was trying to make this fix, but I stumbled on my lack of experience with Swift. After changing UICollectionView+Rx.swift:123:37: Cannot assign a value of type '[E]' to a value of type '[Any]' If someone could help me, I would be happy to create a PR with the fixes. 😉 |
Hi Andre :) Thnx for your interest in helping this project. I've started to work on this problem before a couple of weeks. I have a solution here. As you can see, it's not trivial because of the way swift generics interact with objective-c runtime, but should be really sweet to use it. The reason why it's not merged yet into develop branch and into release pipeline is because I would like to add out of the box incremental updates in RxCocoa project for UITableView and UICollectionView. The reason why I would like to do that is because I want to make sure that public interface makes sense for incremental updates also. I guess I could just design it so it makes sense, but proof by demonstration is best IMHO :) Here are the ways how you can help us get this finished soon:
We can chat more about this in slack channel if you like :) #uitableview_interface |
func rx_subscribeRowsToCellWithIdentifier<E, Cell where E : AnyObject, Cell: UITableViewCell> (cellIdentifier: String, configureCell: (UITableView, NSIndexPath, E, Cell) -> Void) (source: Observable<[E]>) -> Disposable
I want to be able to configure my cells with structs, but since
E
must be anAnyObject
I can't. Can that be changed toany
?The text was updated successfully, but these errors were encountered: