rx-cocoa Questions

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

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

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

2

I use the following UIViewController and RxSwift/RxCocoa based piece of code to write a very simply MVVM pattern to bind a UIButton tap event to trigger some Observable work and listen for the resu...
Agenda asked 21/1, 2020 at 20:23

3

Solved

I have a table view in my app. I generated the datasource for this table using following code struct ContactNameNumberBlockStatus { var contactThumbnail: Data? var contactName : String var cont...
Contractor asked 5/2, 2017 at 8:39

2

How do I populate the NSTableview with an array using reactive framework? In iOS for UITableview: self.viewModel.arrayElements.asObservable() .observeOn(MainScheduler.instance) .bind(to: detai...

1

Solved

I am learning RxSwift at the moment. When would you use .drive(something) and when .bind(to: something)? Example: let disposeBag = DisposeBag() let isEnabled = BehaviorRelay(value: true) let but...
Cryptology asked 20/5, 2020 at 9:33

2

Solved

On RxCocoa I was wondering why the PublishRelay doesn't have an asDriver() method like the BehaviorRelay ? Currently if I want to convert the publishRelay into a Driver, I have to specify what to r...
Elliellicott asked 29/1, 2019 at 17:6

3

Solved

I'm using RxSwift to bind a model array to a collection view How do I get the model object from a given indexPath? I'm doing the binding like this: vm.bikeIssueCatagories() .drive(self.collecti...
Byplay asked 18/10, 2017 at 13:41

3

I want to change view2 position automatically when view1 position will change and bind the both view position using Rxswift. I try to observe view frame/position using this view.rx.observe(CGRect...
Raymundorayna asked 17/5, 2017 at 12:22

3

Solved

I want to get object from tableView.rx.itemSelected and after process it. This method return IndexPath, so I can map this value. But how to get object at index from the ViewModel? struct ViewModel...
Cosmic asked 2/10, 2017 at 7:20

1

Solved

I have 2 questions: What difference between 'bind(onNext:' and 'subscribe(onNext:'? struct Info { var index: Int? var data: String? } let infoData: BehaviorRelay<Info> = BehaviorRelay&...
Musicology asked 22/3, 2019 at 6:50

1

Solved

I'm trying to make a small reactive wrapper for ImageDownloader from AlamofireImage: import Foundation import UIKit.UIImage import AlamofireImage import RxCocoa import RxSwift extension Reactive...
Atalanta asked 3/12, 2018 at 9:50

2

Is there a way to bind a UIPickerView with an Observable? For example for a UITableView I would do: myObservableArray.bindTo(tableView.rx.items(cellIdentifier: "Identifier", cellType: MyCustomTab...
Hansom asked 17/2, 2017 at 18:36

3

Solved

I am using RxSwift for tableview. I need to reload my table each time after getting data from api but I'm failed to do this. I couldn't find any solution for that. Can anybody help? I have an arra...
Sea asked 20/3, 2017 at 8:54

2

Solved

Now I need to change the app theme(colors) based on configuration API, So I am using RxCocoa, RxSwift frameworks to create observable on each view controller to apply a new theme on the app. My qu...
Jemimah asked 5/8, 2018 at 13:32

1

Solved

I have a UITextField called commentField and I create an Observable<Bool> like this: let isCommentFieldValid = self.commentField.rx.text.orEmpty.map({ !$0.isEmpty }) This observable determ...
Zephyrus asked 13/7, 2018 at 18:22

2

Solved

I am using RxSwift for TableView.I need to calculate height of dynamic cells previously I did it in WillDisplayCell delegate method. I don't know how to bind TableView Delegate methods with RxSwift...
Tish asked 30/3, 2017 at 11:11

2

Solved

Lets say i have a CustomView with a value in it. I want to expose that value to the world using rx.value (Observable) instead of having to access it by value (Int). final class CustomView: UIView...
Selina asked 21/6, 2018 at 13:44

4

Solved

I'm new to RxSwift and trying to learn by creating a simple signup form. I want to implement it using a UITableView (as an exercise, plus it will become more complicated in the future) so I'm curre...
Wilder asked 9/3, 2018 at 15:49

2

Hi I am trying to make a UIRefreshControl work with RxSwift. Therefore I am using the Activity Indicator that is in the RxSwift Example. In my viewModel I have the following function and variable ...
Hyetal asked 30/3, 2017 at 9:46

1

Is there a way to replace the method func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize ...
Pallaten asked 1/3, 2017 at 21:21

2

Solved

I have a UISwitch that needs to be selected in order to continue onto the next form screen. So I would like to bind the UISwitch selected to the UIButton enabled. I just can't get this sample going...
Schade asked 27/5, 2016 at 10:39

1

Solved

I'm combining a viewDidAppear and filter Drivers with RxSwift. And they work great. But when I introduce a third Driver, it stops calling flatMapLatest on the latest combine. In my View Controller...
Thom asked 11/7, 2017 at 16:39

2

I am subscribing 2 times for 1 UIButton : First subscription, for updating UI on every click Second subscription, for updating the values on Web Service every 1 second after accumulated clicks. ...
Tellurate asked 4/4, 2017 at 12:9

© 2022 - 2024 — McMap. All rights reserved.