Questions tagged [rx-cocoa]
238 questions
1
vote
0 answers
Realm : uncaught exception in notifier thread: N5realm10LogicErrorE: Bad version number
I have integrated realm in my project. I am working on swift 2.3 and when i am trying to run my project i am getting uncaught exception in below file and mentioned function and throws LogicError.
group_shared.hpp file
template
inline void…

Kirti Parghi
- 1,142
- 3
- 14
- 31
1
vote
2 answers
enable button with RxSwift logic
I'm new to RxSwift and want to achieve the following. I have a email and password TextField. When you've entered a text in both textfields a button should be enabled.
In my ViewController I do the following:
txtEmail.rx.text.asObservable()
…

Steaphann
- 2,797
- 6
- 50
- 109
1
vote
1 answer
RxSwift + RxRealm + RxCocoa insert rows to UITableView
When I observe my realm model and bind changes to table view it works. But when I try to add row to the table I have some crash
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'attempt to insert row 1
into…

milczi
- 7,064
- 2
- 27
- 22
1
vote
0 answers
RxSwift 'bindTo(aNSButton.rx_enabled)' failed
here is my code:
let aDisposeBag = DisposeBag()
class LoginController: NSViewController {
@IBOutlet weak var accountField: NSTextField!
@IBOutlet weak var passwdField: NSSecureTextField!
@IBOutlet weak var loginBtn: NSButton!
…

jiangjiefs
- 149
- 11
0
votes
0 answers
Reorder the content of BehaviourRelay without emitting
I have a situation at hand. I have a designerDress:BehaviourRelay<[MyCustomObjects]>
Already implemented in code which drives few UI components.
Now I have a requirement to reorder the array which is simple
let tempArray =…

amar
- 4,285
- 8
- 40
- 52
0
votes
1 answer
RxCocoa/RxSwift crash when accessing TableViewDataSourceNotSet tableView(_:cellForRowAt:)
I'm using RxCocoa and RxSwift to render a UITableView against an array provided by a BehaviorRelay. The code to bind the data is below:
// MyViewModel:
var itemList = BehaviorRelay(value: [MyItem]())
...
func loadData() {
var items = [...] //…

Mando
- 11,414
- 17
- 86
- 167
0
votes
0 answers
How to make Custom Control Property with respect to get value in iOS Combine?
Here is my code to set up Custom Property in RXSwift for the UIControl but same I am not able to get in Combine although I have taken the CombineCocoa Reference.
public class OTPFieldView: UIControl, InputFieldView {
public typealias FieldType =…

RakeshDipuna
- 1,570
- 13
- 19
0
votes
1 answer
"withLatestFrom" won't accept BehaviorRelay
I've got this simple view model to check a phone number's status before registering a user. But I've got this error:
Instance method 'withLatestFrom' requires that 'BehaviorRelay' conform to 'SharedSequenceConvertibleType'
Here's the code:
import…

Bawenang Rukmoko Pardian Putra
- 1,311
- 1
- 17
- 33
0
votes
1 answer
Rxswift modelSelected
Data was imported and bound using api.
And I want to apply it to the table view and take data to the detailed view using Rxswift when selecting the table view.
But there's an error. What's wrong?
enter image description here
Fetch Service
…

이진성
- 1
- 1
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…

FrugalResolution
- 568
- 4
- 18
0
votes
1 answer
Two ways binding textfiled in RxSwift in different type
I am making two ways binding for UITextField extension. It works well with string. But why not Int?
This is my extension:
import Foundation
import RxCocoa
import RxSwift
extension UITextField {
func bind(with property: BehaviorRelay,…

Ho Si Tuan
- 520
- 3
- 13
0
votes
1 answer
Best way to update nested property in BehaviourRelay
I have the following Model
final class Vehicle {
var cars:[SportsCar] = []
}
final class SportsCar {
var isCheap:Bool = false
}
Assumming that Vehicle & SportsCar are both Equatable (I Have ommited Equatable conformance for simplicity).
Goal:…

Mussa Charles
- 4,014
- 2
- 29
- 24
0
votes
0 answers
Rx-based tree structure with UITableView in Swift
I want to implement a tree structure by using RxCocoa & RxSwift in a UITableView something like
Item1
child1
child1.1
child1.2
child2
Item2
Item3
child1
child2
child2.1
…

Li Jin
- 1,879
- 2
- 16
- 23
0
votes
1 answer
RxSwift onNext not calling scan
I am trying to create a UICollectionView, so that I can add and delete items from it's data source as a Driver. I have a viewModel below
import Photos
import RxCocoa
import RxSwift
class GroupedAssetsViewModel {
enum ItemAction {
case add(item:…

Alexander Kraynov
- 172
- 1
- 11
0
votes
3 answers
Limit UITextField to letters and spaces only
I added a UITextField and I want to restrict it to only alphabets and spaces. So with the following;
let set = CharacterSet (charactersIn: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLKMNOPQRSTUVWXYZ")
How can I do this without using delegates if…

Mehmet Ceylan
- 385
- 1
- 6
- 18