rx-swift Questions

4

Solved

I want to achieve result like this: L -1-2-3------4------5-6-7-8---- R ---------A------B----------C-- O ---------A3-----B4---------C8 So basically something like withLatestFrom but combining va...
Undertrick asked 3/11, 2017 at 14:45

4

Solved

I want to observe the property UITextfield.editing. I'm using this code: self.money.rx_observe(Bool.self, "editing").subscribeNext { (value) in print("") }.addDisposableTo(disposeBag) But in th...
Sheilasheilah asked 21/9, 2016 at 22:19

5

Solved

I want to use Rxswift and not IBActions to solve my issue below, I have a UISwitch and I want to subscribe to the value changed event in it, I usually subscribe on Buttons using this manner @...
Clean asked 19/11, 2018 at 19:16

2

Solved

I would like to have a UITextField configured with RxSwift/RxCocoa so that it only contains up to ... characters. I do not want to use the UITextFieldDelegate for this but would love to achieve thi...
Palter asked 14/2, 2018 at 15:12

4

I'm trying to use RxSwift for binding in MVVM. I have a Enum: enum Color : Int { case Red = 0, Green } and class for test class Test : NSObject { var color: Color = .Red dynamic var test: St...
Reeve asked 16/3, 2016 at 9:31

3

Solved

I am using the AWS Amplify library https://github.com/aws-amplify/amplify-swift to communicate with the Cognito service. Most of the functions have been rewritten using the new async/await approach...
Appliance asked 6/12, 2022 at 14:31

8

Solved

I have a Variable which is an array of enum values. These values change over time. enum Option { case One case Two case Three } let options = Variable<[Option]>([ .One, .Two, .Three ]) ...
Rabat asked 17/3, 2016 at 2:0

5

I want to subscribe to an observable, but in some logic, I will re-subscribe to it. If I don't want to write some special logic for it, how can I dispose the last subscription when I add a new one?...
Maleki asked 8/8, 2017 at 3:49

4

Solved

I just updated Xcode to the latest version, and the project is no longer compiling. I removed everything and tried to rebuild pods but ended up having the same issue this issue: [x] /Users/alouane...
Hallette asked 19/9, 2020 at 9:17

7

Solved

I have a label with isUserInteractionEnabled set to true. Now, I need to add UITapGestureRecognizer for the label. Is there a way to add in Rx way. I have looked at the RxSwift library here. Which...
Aristides asked 19/6, 2017 at 12:7

5

In RxSwift it's pretty easy to bind a Driver or an Observable in a View Model to some observer in a ViewController (i.e. a UILabel). I usually prefer to build a pipeline, with observables created ...
Male asked 8/9, 2019 at 13:58

1

I wonder if there is an excellent document to show the difference between Combine and RxSwift? It's good for me to quickly learn the Combine because I already had good knowledge about RxSwift
Feinleib asked 9/6, 2022 at 9:4

3

Solved

I want to cancel a request and one of the ways is to manually remove the disposable bag. .addDisposableTo(disposeBag) As I have the disposeBag object, is there a good way to cancel the request o...
Bergamo asked 16/8, 2016 at 7:49

5

Solved

I learn the sample code in RxSwift. In the file GithubSignupViewModel1.swift, the definition of validatedUsername is: validatedUsername = input.username //the username is a textfiled.rx_text .fla...
Darya asked 26/5, 2016 at 8:48

2

Solved

I am new to RxSwift programming. I am confused between the two while coding. Which one should be used to store datasource of table and how to decide that ?
Sicular asked 26/2, 2020 at 17:28

2

Solved

First of all, I'm new to rxswift so I guess the answer is obvious however at the moment I can't find solution by myself. I have two functions: func downloadAllTasks() -> Observable<[Task]&g...
Tremble asked 1/12, 2016 at 20:37

2

Solved

I'm beginner in RXSwift, and i have problem with my code I have code: let dartScore = PublishSubject<Int>() dartScore.asObservable() .scan(501) { intermediate, newValue in let result = i...
Almshouse asked 3/12, 2017 at 3:42

4

just like UITableView items.bindTo(tableView.rx.items(cellIdentifier: "cellIdentifier", cellType: AttentionTableViewCell.self)){(row,dic,cell) in cell.configueCell(with: dic) }.addDisposableTo(...
Plenty asked 8/2, 2017 at 9:2

3

I would like to do some heavy lifting in the background thread of my iOS app and NOT freeze the UI while it is being performed. What I try is: self.someDisposable = heavyLiftingFuncReturningObserv...
Curassow asked 9/11, 2017 at 12:55

5

I am using pattern MVVM+Coordinator. Every my controllers are created by coordinators. But what is the correct way to stop my coordinators when tapping on back button of Navigation Controller? cla...
Saidel asked 12/1, 2019 at 2:50

4

I am new here about RxSwift, In my case, I want to use UserDefaults with RxSwift to simplify my code, so I did this following code my question is, when I clicked a cell, but the subscribe method s...
Florist asked 18/3, 2017 at 17:22

3

Solved

Is there an operator that can filter nil? The closest I've come is the solution mentioned here: https://github.com/ReactiveX/RxSwift/issues/209#issuecomment-150842686 Relevant excerpt: public pro...
Hereinbefore asked 11/4, 2016 at 19:36

8

Solved

As of RxSwift4, Variable is moved to Deprecated.swift marking the possible deprecation of Variable in future. An alternate proposed to Variable is BehaviorRelay. While posting this question, as I c...
Maundy asked 23/11, 2017 at 9:59

1

Solved

I am trying to perform a complex computation in the background upon table row selection but it freezes the UI. Please have a look at my code and tell me what might be wrong. tableView.rx .modelSel...

2

Solved

I'm new in RxSwift, I don't understand what is difference between do(onNext:) and subscribe(onNext:). I google it but did't found good resources to explain the difference.
Crawly asked 31/12, 2018 at 10:55

© 2022 - 2024 — McMap. All rights reserved.