Questions tagged [swiftbond]

28 questions
0
votes
0 answers

Use SwiftBond (ReactiveKit) with Codable Struct?

I'm trying to make my Codable model work with ReactiveKit/Bond. I believe I need to conform to the PropertyProtocol and set my properties as Property types, but decoding fails. If I set var x: String decoding doesn't fail. What I've tried: import…
0
votes
1 answer

Invalid update: invalid number of items in section 0 in Reactive Programming issue

I have big trouble because when I selected a cell in my collectionView and change my array Data I got this error message : 'Invalid update: invalid number of items in section 0. The number of items contained in an existing section after the update…
0
votes
0 answers

how can I create an String array based on another String array whose elements contain textfield.text. Don't know how to filter it in the right way:(

I'm trying to implement searchTextfield to my project, I am using ReactiveKit/Bond. I create a function but don't know how to filter my array elements and create a new array based on searchTextfield.text text. var myArray =…
Artem
  • 1
0
votes
0 answers

Bind single tableview for 2 data sources and update based on selected segment with Bond

I am trying to bind single UITableView with 2 data sources. My code is like this viewModel?.dataSource?.currentYear?.bind(to: tableViewMonths, cellType: StatementExportMonthTableViewCell.self) { (cell, name) in cell.updateWith(month:…
Paras Gorasiya
  • 1,295
  • 2
  • 13
  • 33
0
votes
1 answer

Swift Bond framework - many to one relationship - trigger a single command if anything changes

Consider the following example: Given a set of observables: let value1 = Observable(false) let value2 = Observable(false) let value3 = Observable(false) let isSaveButtonEnabled = Observable(false) I'd like to execute this code every time something…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
0
votes
1 answer

Swift - Bond Framework - one-to-many bind relationship

I'm interested in binding a single Observable to multiple receivers. How can I achieve this concisely? Currently, I have to resort to binding every property: model.sectionEnabled.map{!$0}.bind(to:…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
0
votes
0 answers

Bind custom Checkbox Bool property to variable with Bond

I'm using https://github.com/DeclarativeHub/Bond library for binding operations. I have an UIControl class which is a checkbox. It has a proper called isChecked . I want to bind a boolean value to this property. However, I'm getting Cannot invoke…
Emre Önder
  • 2,408
  • 2
  • 23
  • 73
0
votes
2 answers

How to pass Array Values as Separate Parameters in Swift?

I have the following code using Bond. combineLatest(settings.userAutoRefreshInterval, config.value?.userRefreshInterval).observeNext { [weak self] _ in self?.updateAutoUserRefresh() }.dispose(in: self.bag) Of course, that has a build error…
Charlie Fish
  • 18,491
  • 19
  • 86
  • 179
0
votes
1 answer

Generic parameter 'A' could not be inferred (Swift 4, Bond and ReactiveKit frameworks migrating from Swift 2)

guys! I'm trying to migrate from Swift 2 to Swift 4. Project is using Bond and ReactiveKit frameworks. I have extension for UISearchBar. So I'm facing a problem migrating from this: import UIKit import Bond import ReactiveKit public extension…
Oleh Veheria
  • 412
  • 5
  • 13
0
votes
1 answer

Bind UITextField to view model variable

I'm trying to use Bond to bind UI elements to my view model. When I try to bind the searchTextField to my view models searchString, Xcode 8.3.3 gives me an "Incorrect argument label in call (have 'to:', expected 'signal:')" error. What is…
Melodius
  • 2,505
  • 3
  • 22
  • 37
0
votes
2 answers

Binding textfield text to enable button not working

I am new to reactive programming, and Bond framework specifically. I know I may be doing things that are wrong in my basic understanding of this programming technique. This is the situation: I have a UITextView and an "approve" UIButton. I want the…
Eyzuky
  • 1,843
  • 2
  • 22
  • 45
0
votes
1 answer

Swift Bond compile error in NSObject+KVO.swift file

I have installed Bond 6.2.6 with CocoaPods. While building my project, an error has appeared in the file: \Pods\Bond\Sources\Bond\Shared\NSObject+KVO.swift The error: .../NSObject+KVO.swift:239:81: Cannot convert value of type '(_, _) ->…
Dorad
  • 3,413
  • 2
  • 44
  • 71
0
votes
1 answer

How to set title of Button using ReactiveKit Bond?

Is there an equivalent of rac_liftSelector in Reactivekit to implement selector for setTitle?
Abhilash
  • 121
  • 1
  • 7
1
2