Questions tagged [rxdatasources]
70 questions
2
votes
0 answers
leak in CollectionView using RxDataSources and RxSwift
I have a table view cell with a collection view. both bonded through rxdatasource, I am getting the leak using instruments when the view is loaded. Any thoughts on what could be the reason for this? Thanks.
the leak
HomeViewcontroller
let…

Mohamed ALOUANE
- 5,349
- 6
- 29
- 60
2
votes
1 answer
How to avoid duplicate tap on button on Tableview with RxDataSources
I have a table view with RxDataSources on which cell items got a remove icon. when cells get dequeued and click on that remove icon, all the previous click events get triggered, thus duplicate tap.
Item cell :
removeImageView.rx.tap().map { _ in…

Mohamed ALOUANE
- 5,349
- 6
- 29
- 60
2
votes
2 answers
RxDataSources not updating section header title
I'm using RxDataSources to load and display a UITableview. I am trying to update the section header with the amount of items that it holds, however tough the cell and items update correctly, the title remains stale.
This is my code for the…

Yoav Schwartz
- 2,017
- 2
- 23
- 43
2
votes
0 answers
awakefromnib not called for UICollectionReusableView when using RxSwift datasource
I'm using RxSwift, I managed to create the dataSource and I retrieve cells correctly. Problem is with the section headerView. I have created a UICollectionReusableView class, attaching outlets from storyboard.
The problem is that I retrieve the…

Andrea.Ferrando
- 987
- 13
- 23
2
votes
1 answer
Rx table view not being reloaded after the datasource gets updated
I have a table view that I am trying to make reactive. I have it working using Swift.
Following is the RxSwift code
viewModel.getDetailMessages().asObservable().bind(to: messageTableView.rx.items){ tableView, row, element in
let…

A.S
- 798
- 1
- 10
- 32
2
votes
1 answer
RxDataSources - How to add a custom empty cell when there's no data
struct MyViewModel {
var items: Observable
//....
}
// In view controller
viewModel.items.bind(to: tableView.rx.items(cellIdentifier: "Cell", cellType: MyCell.self)) { index, model, cell in
//...
}
.disposed(by: disposeBag)
If I…

Binh Le
- 486
- 5
- 12
1
vote
1 answer
Last visible cell in CollectionView disappears when updating first visible cell's content
I have a weird behavior using RxDataSources. I am using an RxCollectionViewSectionedAnimatedDataSource. I have a button inside each cell in the collection view, which reveals some content. This content is displayed through the built-in animations…

paprika
- 164
- 1
- 8
1
vote
0 answers
Swift Thread 1: "*** -[__NSFrozenArrayM objectAtIndex:]: index 191 beyond bounds [0 .. 8]"
I have a big tableView that can fit more than 100 cells, I want these cells to be draggable and it works fine with first 10 cells, but after that index I got this error. I use RxDataSources, I saw that someone wrote that stateMachine will help with…

Rebigo
- 13
- 3
1
vote
2 answers
Find an unique identifier for an enum case to conform to Identifiable
I am testing RxDataSources which requires the models to conform to the Equatable and IdentifiableType(similar to Identifiable protocols.
I am using a unidirectional data flow to drive the UI and my model is the following enum:
enum ViewModelType:…

Florian Ldt
- 1,125
- 3
- 13
- 31
1
vote
1 answer
Why UITableViewCell does not bind to cellWiewModel when I use RxTableViewSectionedAnimatedDataSource?
I have some odd problem with UITableViewCell when I use MVVM pattern with RxSwift. I can't describe it, but I will try to explain.
Let's say we have simple UITableViewCell
class MyTableViewCell: UITableViewCell {
var disposeBag = DisposeBag()
…

Michel Rivera
- 79
- 6
1
vote
1 answer
How to reload UITableView by use RxDataSources correctly?
I'm trying to build a tableView witch has many cells with a button, what I want to do is when I click the button in a cell, the cell should be go to the bottom of the table, here's my code:
let datasource =…

user18366298
- 11
- 1
1
vote
1 answer
Binding to a datasource using RxDatasources
I have a list of models that I fetch from a server, and basically I get array of these:
struct ContactModel: Codable, Equatable {
static func == (lhs: ContactModel, rhs: ContactModel) -> Bool {
return lhs.name == rhs.name &&
lhs.avatar ==…

Whirlwind
- 14,286
- 11
- 68
- 157
1
vote
1 answer
RxDataSource: Nest CollectionView in TableViewCell
Definition for Section:
enum ItemDetailTableViewItem {
case itemInfoTopItem(info: ItemDetailViewModelPlus)
case itemHintItem(hint: ItemDetailViewModelPlus)
case itemManaColdownItem(manacd: ItemDetailViewModelPlus)
case…

hhg
- 79
- 1
- 6
1
vote
1 answer
How do I properly return a CollectionViewCell with reuseIdentifier if weak self is nil in RxDataSource function?
I have an issue where [unowned self] was changed to [weak self] within the dataSource function used for a CollectionView using RxDataSource due to a memory leak. I now received a crash from returning a blank collectionViewCell that doesn't have a…

Weston Mitchell
- 192
- 1
- 12
1
vote
1 answer
RxDataSources headerView and footerView
Problem: CollectionView header and footer are not shown before results are retrieved from network service. They are shown after items are retrieved from service.
Result I want:: Show CollectionView header and footer before items are retrieved from…

Polisas
- 491
- 1
- 9
- 20