{"id":13719746,"url":"https://github.com/RxSwiftCommunity/RxCocoa-Texture","last_synced_at":"2025-05-07T11:32:37.988Z","repository":{"id":46224071,"uuid":"143279801","full_name":"RxSwiftCommunity/RxCocoa-Texture","owner":"RxSwiftCommunity","description":"RxCocoa Extension Library for Texture.","archived":false,"fork":false,"pushed_at":"2021-11-05T16:22:07.000Z","size":2309,"stargazers_count":100,"open_issues_count":7,"forks_count":55,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-25T04:18:42.893Z","etag":null,"topics":["asyncdisplaykit","ios-app","rxcocoa","rxswift","texture"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RxSwiftCommunity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-02T10:30:20.000Z","updated_at":"2024-04-11T11:14:15.000Z","dependencies_parsed_at":"2022-09-25T05:01:05.421Z","dependency_job_id":null,"html_url":"https://github.com/RxSwiftCommunity/RxCocoa-Texture","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxSwiftCommunity%2FRxCocoa-Texture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxSwiftCommunity%2FRxCocoa-Texture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxSwiftCommunity%2FRxCocoa-Texture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxSwiftCommunity%2FRxCocoa-Texture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RxSwiftCommunity","download_url":"https://codeload.github.com/RxSwiftCommunity/RxCocoa-Texture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252869175,"owners_count":21816990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncdisplaykit","ios-app","rxcocoa","rxswift","texture"],"created_at":"2024-08-03T01:00:54.917Z","updated_at":"2025-05-07T11:32:34.698Z","avatar_url":"https://github.com/RxSwiftCommunity.png","language":"Swift","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"![alt text](https://github.com/RxSwiftCommunity/RxCocoa-Texture/blob/master/resources/logo.png)\n\n[![CI Status](https://api.travis-ci.org/RxSwiftCommunity/RxCocoa-Texture.svg?branch=master)](https://travis-ci.org/GeekTree0101/RxCocoa-Texture)\n[![Version](https://img.shields.io/cocoapods/v/RxCocoa-Texture.svg?style=flat)](https://cocoapods.org/pods/RxCocoa-Texture)\n[![License](https://img.shields.io/cocoapods/l/RxCocoa-Texture.svg?style=flat)](https://cocoapods.org/pods/RxCocoa-Texture)\n[![Platform](https://img.shields.io/cocoapods/p/RxCocoa-Texture.svg?style=flat)](https://cocoapods.org/pods/RxCocoa-Texture)\n\n## Notice\n- Now support swift 5.x https://github.com/RxSwiftCommunity/RxCocoa-Texture/blob/swift-5.x\n```ruby\npod 'RxCocoa-Texture', '3.x.x'\n```\n\n\u003e ### Your Contributions always welcome welcome!.\n\n## Concept\nRxCocoa provides extensions to the Cocoa and Cocoa Touch frameworks to take advantage of RxSwift.\nTexture provides various basic UI components such as ASTableNode, ASControlNode, ASButtonNode and so on.\nref: [Node Subclasses](http://texturegroup.org/docs/node-overview.html)\n\nSo, This Library provides extensions to the Texture frameworks to take advantage of RxSwift like a RxCocoa\n\nref: [Texture + RxSwift Interactive Wrapper](https://medium.com/@h2s1880/texture-rxswift-interactive-wrapper-d3c9843ed8d7)\n\n## Example\n\n#### Extension\n\n- [ASButtonNode RxExtension Example](https://github.com/GeekTree0101/RxCocoa-Texture/tree/master/Example/RxCocoa-Texture/ButtonTestNode.swift)\n\n- [ASImageNode RxExtension Example](https://github.com/GeekTree0101/RxCocoa-Texture/tree/master/Example/RxCocoa-Texture/ImageTestNode.swift)\n\n- [ASNetworkImageNode RxExtension Example](https://github.com/GeekTree0101/RxCocoa-Texture/tree/master/Example/RxCocoa-Texture/NetworkImageTestNode.swift)\n\n\n- [ASTextNode RxExtension Example](https://github.com/GeekTree0101/RxCocoa-Texture/tree/master/Example/RxCocoa-Texture/TextTestNode.swift)\n\n- [ASEditableTextNode RxExtension Example](https://github.com/GeekTree0101/RxCocoa-Texture/tree/master/Example/RxCocoa-Texture/EditableTextTestNode.swift)\n\n- [ASScrollNode](https://github.com/ReactiveX/RxSwift/blob/master/RxCocoa/iOS/UIScrollView%2BRx.swift)\n\n#### ASBinder\n: Subscribed Observer operates asynchronously.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eExpectation Flow\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eExpectation UI\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth rowspan=\"9\"\u003e\u003cimg src=\"https://github.com/GeekTree0101/RxCocoa-Texture/blob/master/resources/expect.png\"\u003e\u003c/th\u003e\n    \u003cth rowspan=\"9\"\u003e\u003cimg src=\"https://github.com/GeekTree0101/RxCocoa-Texture/blob/master/resources/expect2.png\"\u003e\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nBut, Node dosen't know that event value applied on UI before draw.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eUnexpectation Flow\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eUnexpectation UI\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth rowspan=\"9\"\u003e\u003cimg src=\"https://github.com/GeekTree0101/RxCocoa-Texture/blob/master/resources/badcase.png\"\u003e\u003c/th\u003e\n    \u003cth rowspan=\"9\"\u003e\u003cimg src=\"https://github.com/GeekTree0101/RxCocoa-Texture/blob/master/resources/badcase2.png\"\u003e\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nIn this case, Node should use setNeedsLayout. but, [bind:_] doesn't call setNeedsLayout automatically.\n\nNormally, you can use like this code\n\n```swift\n// Profile NetworkImage Node is default\n// username, description is Optional\n\n// *** self is usernameNode supernode\nviewModel.username\n         .subscribe(onNext: { [weak self] text in \n            self?.usernameNode.rx.text(Node.usernameAttributes).onNext(text)\n            self?.setNeedsLayout() // Here\n         })\n         .disposed(by: disposeBag)\n```\n\nIf you use ASBinder then you don't need call setNeedsLayout. ASBinder will operates it automatically.\n\n```swift\n// Profile NetworkImage Node is default\n// username, description is Optional\n\n// *** self is usernameNode supernode\nviewModel.username\n         .bind(to: usernameNode.rx.text(Node.usernameAttributes),\n               setNeedsLayout: self) \n         .disposed(by: disposeBag)\n\n// *** self is descriptionNode supernode\nviewModel.desc\n         .bind(to: descriptionNode.rx.text(Node.descAttributes),\n               setNeedsLayout: self) \n         .disposed(by: disposeBag)\n```\n\nIf you don't need setNeedsLayout then just write code like this.\n\n\n```swift\n// setNeedsLayout default is nil!\nviewModel.username\n         .bind(to: usernameNode.rx.text(Node.usernameAttributes)) \n         .disposed(by: disposeBag)\n\nviewModel.desc\n         .bind(to: descriptionNode.rx.text(Node.descAttributes)) \n         .disposed(by: disposeBag)\n```\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eASBinder Flow\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eOutput UI\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth rowspan=\"9\"\u003e\u003cimg src=\"https://github.com/GeekTree0101/RxCocoa-Texture/blob/master/resources/asbinder_workflow.png\"\u003e\u003c/th\u003e\n    \u003cth rowspan=\"9\"\u003e\u003cimg src=\"https://github.com/GeekTree0101/RxCocoa-Texture/blob/master/resources/expect2.png\"\u003e\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n- [ASBinder](https://github.com/GeekTree0101/RxCocoa-Texture/blob/master/Example/RxCocoa-Texture/ASBinderTestNode.swift)\n\n\n## Installation\n\nRxCocoa-Texture is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n#### swift 4.x\n\n```ruby\npod 'RxCocoa-Texture'\n```\n\n## Caution\nThis library has been migrated to Texture 2.7.\nWhen Rx subscribe logic moves from initialization to didLoad method. I no longer faced this problem.\nWhen using RxSwift / RxCocoa, it is safe to subscribe from the didLoad method.\nhttps://github.com/TextureGroup/Texture/issues/977\n\n## Author\n\nGeektree0101, h2s1880@gmail.com\n\n## License\nThis library belongs to RxSwiftCommunity.\nRxCocoa-Texture is available under the MIT license. See the LICENSE file for more info\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRxSwiftCommunity%2FRxCocoa-Texture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRxSwiftCommunity%2FRxCocoa-Texture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRxSwiftCommunity%2FRxCocoa-Texture/lists"}