Skip to content

Commit 8e5160a

Browse files
update docs
1 parent b31f71d commit 8e5160a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ override func viewDidLoad() {
164164

165165
func style() {
166166
view.backgroundColor = UniversalColor.background.uiColor
167+
button.model = ButtonVM {
168+
$0.title = "Tap me"
169+
$0.color = .accent
170+
}
167171
}
168172
```
169173

Sources/ComponentsKit/Helpers/UIKit/NSObject+ObserveThemeChange.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ extension NSObject {
2424
///
2525
/// func style() {
2626
/// view.backgroundColor = UniversalColor.background.uiColor
27+
/// button.model = ButtonVM {
28+
/// $0.title = "Tap me"
29+
/// $0.color = .accent
30+
/// }
2731
/// // ...
2832
/// }
2933
/// ```
3034
///
31-
/// > Note: There is no need to update components from the library as they observe the changes internally.
32-
///
3335
/// ## Cancellation
3436
///
3537
/// The method returns an ``AnyCancellable`` that can be used to cancel observation. For

0 commit comments

Comments
 (0)