SwiftDataBinding is a responsive UI Tools, make the rendering of the view changed by data change, inspired by Vue.
- initialize a variable
public let data: DynamicData<String> = DynamicData.Initialize("")
- bind data and UI component
dataLabel.bindText(data)
- change the data and the label will be rendering automatically then
data.assign("new value")
- How to make more UI components responsive?
Refer to the example in 'UIView+DataBinding' file to add capabilities to the UI components you want
-
To run the example project, clone the repo, and run
pod install
from the Example directory first. -
just find the key text "core step" to see how the function works
- RxSwift
- RxCocoa
SwiftDataBinding is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SwiftDataBinding'
SwiftDataBinding is available under the MIT license. See the LICENSE file for more info.