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...
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...
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...
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...
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...
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...
Knock asked 3/1, 2018 at 6:18
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...
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...
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...
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...
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&...
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...
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...
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...
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...
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...
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...
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...
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 ...
1
Is there a way to replace the method
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
...
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...
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...
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
1 Next >
© 2022 - 2024 — McMap. All rights reserved.