Questions tagged [rxdatasources]

70 questions
1
vote
1 answer

RxDataSources testing

I have created tableView with sections by RxDataSources. ViewController viewModel.sectionsObservable .bindTo(tableView.rx.items(dataSource: viewModel.dataSource)) .disposed(by: disposeBag) sectionsObservable emits the event when a…
Adam Smaka
  • 5,977
  • 3
  • 50
  • 55
0
votes
1 answer

How to fix Cyclonemtic Complexity? - RxDataSource RxSwift - SwiftLint

I met warning like this "Cyclomatic Complexity Violation: Function should have complexity 10 or less: currently complexity equals 14 (cyclomatic_complexity)" when I used RxDataSource. My code structure like this: struct ItemDetailDataSource { …
hhg
  • 79
  • 1
  • 6
0
votes
2 answers

How to make Dynamic sections with RxDataSource?

An overview of what I am trying to achieve I am trying to make a notifications tableview and each notification is group by its created date, so the tableview sections will be the number of created date, each section with the notifications created at…
Adam
  • 13
  • 7
0
votes
1 answer

Clarity on init with `Self` requirement of SectionModelType in RxDataSources

Binding a sectioned table with RxDataSources using a TableViewSectionedDataSource, requires sections which conform to SectionModelType. This SectionModelType protocol has the following initializer as one of it's requirements: init(original:…
Swapnil Luktuke
  • 10,385
  • 2
  • 35
  • 58
0
votes
1 answer

RxDataSources collection view cell always uses fade for insert cell animation, can't change to a different animation

I am having an issue with cell animations using RxSwift on a UICollectionView, my simple setup is as follows: collectionView.register(UINib(nibName: "CustomCollectionCell", bundle: nil), forCellWithReuseIdentifier: "cell") let dataSource =…
Kex
  • 8,023
  • 9
  • 56
  • 129
0
votes
2 answers

RxDataSources cell reload animations not working properly

I am having some issues with the RxDataSources cell reload animations for RxSwift. I have a simple table setup like so: import UIKit import RxDataSources import RxCocoa import RxSwift import Fakery class ViewController1: UIViewController { …
Kex
  • 8,023
  • 9
  • 56
  • 129
0
votes
1 answer

Swift 5 RxDataSource expandable cells

I want to pass expandable tableView from default to Rx, but i found trouble that i can't use properly numberOfRownInSection. Now the logic is... when you struct has flag isExpandable = false, row count is 0 What i have is tableView with static…
George Heints
  • 1,303
  • 3
  • 20
  • 37
0
votes
1 answer

RxDataSources itemDeselected not getting called

I'm using RxDataSources and trying to make a "toggle" function for cell selection — i.e., to allow cells (in a single-selection tableView) to be selected and deselected by tapping. I'm using tableView.rx.itemSelected to get the selection, and…
jbm
  • 1,248
  • 10
  • 22
0
votes
2 answers

Trying to bind an output to my tableviewCell UI Element in RxSwift

I have an output that lives in my VM and based on some change I want my textfield that resides in my custom tableviewCell to change in some way. I am unsure about how to have my UItextfield that lives in the tableviewcell bind to my output.
Sara
  • 103
  • 1
  • 13
0
votes
1 answer

RxDataSources `Generic parameter 'Self' could not be inferred`

I know there are a lot of questions about this, I looked at all of them but it doesn't fix my problem. I also commented on one of them but the question doesn't seem to be active anymore so I don't expect an answer there. I'm trying to implement…
Jeroen
  • 2,011
  • 2
  • 26
  • 50
0
votes
1 answer

How to manage tree like data models bound to TableViewCell with RxSwift

I have a data model like below, [Car Brand] has [Types] has Year or specific model (string) for example BMW > Z4 > 2005 BMW > Z3 > 1999 BMW > Z3 > 2001 Porshe > Carrera > 1999 Audi > TT > 2002 The yearView backgroundColor has to be changed after…
mert
  • 1,090
  • 13
  • 26
0
votes
1 answer

BehaviorRelay/Variable slow RxDataSources if a lot of data in UITableview

Using RxDataSources I have a UITableView with a lot of sections and cells. When I search and replace the data with a new data source, my UI is blocked. I have tried throttle and debounce, but if I search at the 'right' moment, then the UI still gets…
WYS
  • 1,637
  • 2
  • 16
  • 37
0
votes
1 answer

Joining multiple requests into one. Array of observables into an observable of an array

I am doing multiple requests for every section that I have in my collectionView. The idea was to join them together into an Observable<[FeedSection]> so that I can bind it to the collectionView sections. Right now I am having an array of observables…
denis631
  • 1,765
  • 3
  • 17
  • 38
0
votes
1 answer

How can I get RxDataSource to work

Do I need to add as a pod? I need to create a sectioned tableView with RxCocoa UI binding. I have not been able to find the right documentation to implement it. thanks in advance this is my Podfile # Uncomment the next line to define a global…
user4422315
0
votes
1 answer

How to move logic to show UITableViewRowAction from delegate method to View Model (MVVM Architecture)

I'm learn to use RxSwift and RxDataSource to separate business logic from View Controller (using MVVM). Suppose I want to create table view like in the Mail App in iOS, when user swipe left, there are delete button and More button. In the normal…
Jefferson Setiawan
  • 536
  • 1
  • 5
  • 22