Questions tagged [rx-cocoa]

238 questions
3
votes
2 answers

RxSwift - rx.tap not working

I have view controller. Inside it I have view lazy var statusView: StatusView = { var statusView = StatusView() return statusView }() Inside statusView I have button lazy var backButton: UIButton = { var button =…
Alexey K
  • 6,537
  • 18
  • 60
  • 118
3
votes
1 answer

iOS autocompletion not working on RxCocoa Xcode 8.3

I'm having problem with RxSwift and RxCocoa. I have update to latest version 3.3 and Xcode 8.3 But there are problem with autocomplete feature with RxCocoa. Every time I write textfield.rx.text. There will be no autocomple import UIKit import…
Lê Khánh Vinh
  • 2,591
  • 5
  • 31
  • 77
3
votes
3 answers

RxSwift: Observe viewDidLoad from view model without Subjects

I have a dependency problem with my UIViewController and my view model. Basically I want to listen the viewDidLoad event inside my view model. At the moment I have a Class A which instantiates view model and UIViewController with parameter the…
Marco Santarossa
  • 4,058
  • 1
  • 29
  • 49
3
votes
1 answer

How to detect if a observable has not emitted any events for specific time in RxSwift

I am trying to detect if a observable(my case button.rx.tap) has not emitted any value for say like 3 seconds. If yes, I would like to update the user interface. Here is my attempt so far: Observable.interval(3, scheduler:…
subash
  • 172
  • 1
  • 2
  • 9
3
votes
2 answers

How to solve Xcode build error "No such module RxCocoa"?

I'm very new on Mac / iOS development with Xcode and I have trouble on building my App. I work since 4 days on that issue, but I have no more ideas to find the reason. The App has 6 projects, bundled in a xcworkspace. I added via cocoapods and via…
Tino
  • 31
  • 1
  • 4
2
votes
1 answer

Unable to build a Swift package after adding the `RxSwift` package dependency: "product 'RxCocoa' not found"

I have created a new Swift package and trying to use the RxSwift dependency within it. I followed these instructions to add the dependency but my package is unable to build after this with the following error: product 'RxCocoa' required by package…
Mando
  • 11,414
  • 17
  • 86
  • 167
2
votes
1 answer

Missing Required Module 'RxCocoaRuntime'

I am using RxCocoa in custom framework, so I am trying to inject dependencies with SPM and make that .xcframework. I made the .xcframework, but the following error keeps appearing. The process of creating and configuring the framework project and…
KMBANG
  • 21
  • 4
2
votes
1 answer

Why RxCocoa didn't provide subscribe for UILabel's text change?

RxCocoa provide subscribe for UITextField and UITextView text change: UITextField().rx.text.orEmpty.changed .subscribe { text in print(text) } .disposed(by: disposeBag) UITextView().rx.text.changed.subscribe { t in …
无夜之星辰
  • 5,426
  • 4
  • 25
  • 48
2
votes
1 answer

Implementing multiple sections with RxDatasources

I am trying to make multiple sections (two actually) using RxDatasources. Usually with one section, I would go like this: Section model: import Foundation import RxDataSources typealias NotificationSectionModel = AnimatableSectionModel
Whirlwind
  • 14,286
  • 11
  • 68
  • 157
2
votes
1 answer

How to use SkeletonView besides UITableView/UICollectionView RxCocoa binding

For using SkeletonView you have to implement UITableView/UICollectionView dataSource which i can't use beacuse i'm using tableView.rx.items to bind my table to some observable. so how can i use RxCocoa besides SkeletonView. any suggestion? For more…
Mehrdad
  • 1,050
  • 1
  • 16
  • 27
2
votes
1 answer

Why calling Completable method inside of flatMap does not working?

protocol TodoUseCase { func add(title: String, description: String) -> Completable } final class CreateTodoPresenterImpl: CreateTodoPresenter { var todoUseCase: TodoUseCase! var bag = DisposeBag() func setBind() { …
YOSUKE
  • 331
  • 3
  • 13
2
votes
2 answers

why deinit of view controller is not calling using RXSwift?

I tried a few things but couldn't find a solution. I am navigating the controller in the onNext block but the deinit is not calling. I have also declared the self as weak in the rx closures. Below is the complete class code. Please correct if I am…
Ale
  • 25
  • 8
2
votes
1 answer

Rxswift strange behaviour combining multiple observables

I'm quite new to reactive programming so it's still hard to me to comprehend how it works. What I'm trying to do: when user taps on signUpButton (signUpTrigger), multiple observables are fired. I'm combining their results and producing new…
Polisas
  • 491
  • 1
  • 9
  • 20
2
votes
0 answers

Observe UIUserInterfaceStyle when user change devices theme using RxSwift

How can I observe user device theme when user changes theme using RxSwift? I already wrote with this code but it doesn't trigger when user changes theme. UIScreen.main .traitCollection .rx …
mohammad_Z74
  • 244
  • 2
  • 10
2
votes
1 answer

How do I solve "Reactive<_>' is ambiguous" error in tableView context

I have a method that returns a Single: func getEventStatus() throws -> Single { return try mainService.getEventStatus() } And I tried to bind it to a tableView but got an error saying that it doesn't work on Singles, so I tried…
Joakim Sjöstedt
  • 824
  • 2
  • 9
  • 18