Questions tagged [rx-swift]

RxSwift's intention is to enable easy composition of asynchronous operations and event/data streams. Use this tag only for questions that are specific to the RxSwift - Reactive Programming paradigm, or those that require code in the language. Use the related tags [ios], [osx], [apple-watch], [cocoa-touch], and [cocoa] for (language-agnostic) questions about the platforms or frameworks.

About Rx and RxSwift

Rx is a generic abstraction of computation expressed through Observable<Element> interface.

RxSwift is a Swift version of Rx.

It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment.

Cross platform documentation can be found on ReactiveX.io.

Like the original Rx, its intention is to enable easy composition of asynchronous operations and event/data streams.

KVO observing, async operations and streams are all unified under abstraction of sequence. This is the reason why Rx is so simple, elegant and powerful.


Resources

2149 questions
0
votes
1 answer

Understanding generics and how

I'm new to a company and trying to understand the used generics. The setup of a model contains var selectedChannel: Driver { get } @available(*, deprecated, message: "Use driver selectedChannel") var selectedChannelValue: Channel { get…
0
votes
2 answers

How to realize UIDatePicker with RXSwift

Tell me please, How I can set minimum and maximum date and just date for UIDatePicker with RxSwift
0
votes
1 answer

RXSwift collectionView.indexPathsForVisibleItems is empty

I am new to RXSwift. So basically I want to move to the right only when the last cell is visible in my collectionView, but the visibleIndexPaths always return an empty list, if I try to get the visibleIndexPaths at #1 it will work fine, but not work…
Zim
  • 674
  • 7
  • 15
0
votes
1 answer

RxSwift [weak self] is accessible to all other operators below

I'm using Rxswift to design ViewModel. Below is the code that I wrote. In my first map operator used [weak self] and used guard to unwrap the value. What I realized is 'self' that I unwrapped in first map is still available in second map and in all…
NewBie
  • 7
  • 2
0
votes
1 answer

UIcollectionView inside UItableViewcell using rxSwift fail

So i am trying implementing collectionView inside tableviewCell and i get a weird behaviour after fetching data. This is the tableViewCell: class PortfolioPieTableViewCell: PortfolioBaseCell { @IBOutlet weak var pageControl: UIPageControl! @IBOutlet…
ironRoei
  • 2,049
  • 24
  • 45
0
votes
0 answers

How to binding data in swift?

I'm going to show the view the data I got from the server. An error occurred while developing using Rxswift and MVVM. The id value must be received from the product model, and an error occurs in this part. extension SelectViewController:…
earth
  • 85
  • 3
  • 13
0
votes
1 answer

RxSwift modelSelected Drive model on model View & Get that model on DetailView

This is my FirstView ( Parent VIew) tableView.rx.modelSelected(Kinder.self) .asDriver() .drive(self.detailKinderViewModel.currentKinder) .disposed(by: disposeBag) This is ViewModel ( BehaviorRelay ) lazy var…
0
votes
0 answers

Swift. Setting contentInset of UIScrollView not working

I have a UIView located a UIScrollView on it. let curtainView = UIScrollView () curtainView.snp.makeConstraints {make in make.edges.equalToSuperview () } And also UIView. let someView = UIView () someView.snp.makeConstraints {make in …
0
votes
0 answers

Duplicate Cells randomly

Greetings I have the disadvantage that the cells of the tableview are duplicated in a random way, at certain times the event occurs, not always i think i need to clean or reload data but im not sure, could you help please. final class…
Zac Mazk
  • 1
  • 3
0
votes
1 answer

How can I read the value of an RxSwift property? Bool

I'd like to read the value of a property var checkInEnabled: Driver { get } I only need to to run a bit code once when the class has loaded, so I don't want to use something like: roomStatus.checkInEnabled .drive { [weak self] enabled…
Code
  • 81
  • 10
0
votes
1 answer

How to implement two-way binding with additional checks

There is a UISwitch and a ControlProperty which are bound each other. However I cannot use standard two-way binding operator <-> because of the following requirements: If user turns UISwitch ON, I need to check some condition and, if not met,…
Nick
  • 3,205
  • 9
  • 57
  • 108
0
votes
1 answer

A page has multiple UITextField the keyboard cannot be hidden

There is a UIScrollView, contentView of scrollView have a UINibView, UINibView have three UITextField: Action of first UITextField: display a custom view; Action of second UITextField: show system keyboard; Action of third UITextField: display a…
0
votes
1 answer

RxSwift with MVVM, RadioButton not working

im stucked with this situation This is the view raidobuttons and label are inside of a stackview var radioButton: RadioButton = RadioButton(duration: 0).usingAutoLayout() var radioButtonNo: RadioButton = RadioButton(duration:…
Zac Mazk
  • 1
  • 3
0
votes
1 answer

how to change value in struct globally in swift

So I have an api request that requests a bunch of data from a fake api url, the data I am getting is being put on a placeholder, I just want to have a global variable to be able to use that array of codable data in my collectionviews. struct…
0
votes
1 answer

How to pass chain view controller presenter with observable

I'm new in the RxSwift development and I've an issue while presentation a view controller. My MainViewController is just a table view and I would like to present detail when I tap on a item of the list. My DetailViewController is modally presented…
DEADBEEF
  • 1,930
  • 2
  • 17
  • 32
1 2 3
99
100