You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> The current release tag is `0.2.0`; bump it as you publish newer versions.
44
+
> 현재 최신 태그는 `0.3.0`이며 릴리스에 맞춰 갱신해 주세요.
45
+
> The current release tag is `0.3.0`; bump it as you publish newer versions.
46
46
47
47
## 사용 방법 (Usage)
48
48
@@ -74,14 +74,14 @@ ContentView()
74
74
}
75
75
```
76
76
77
-
### @Controllable
77
+
### @Callable
78
78
79
79
```swift
80
80
structNumberController {
81
81
privatevar number =0
82
82
var currentNumber: Int { number }
83
83
84
-
@Controllable
84
+
@Callable
85
85
privatemutatingfuncchangeNumber(_value: Int) {
86
86
number = value
87
87
}
@@ -93,8 +93,8 @@ let controller = NumberController()
93
93
print(controller.currentNumber) // 10
94
94
```
95
95
96
-
- 반환 타입이 없는 메서드에 `@Controllable`을 붙이면 본문을 복사한 뒤 `Self`를 반환하는 빌더 메서드가 추가됩니다. 값 타입은 복사본을, 참조 타입은 원본 인스턴스를 그대로 반환합니다.
97
-
Annotate void functions with `@Controllable` to synthesise a builder method that mirrors the body and returns `Self`; value types return a copy while reference types return the original instance.
96
+
- 반환 타입이 없는 메서드에 `@Callable`을 붙이면 본문을 복사한 뒤 `Self`를 반환하는 빌더 메서드가 추가됩니다. 값 타입은 복사본을, 참조 타입은 원본 인스턴스를 그대로 반환합니다.
97
+
Annotate void functions with `@Callable` to synthesise a builder method that mirrors the body and returns `Self`; value types return a copy while reference types return the original instance.
98
98
-`mutating`, `async`, `throws` 등 기존 선언의 효과는 새 메서드에도 유지됩니다.
99
99
Existing modifiers such as `mutating`, `async`, and `throws` propagate to the generated method.
100
100
- SwiftUI `View`처럼 `@State`를 사용하는 값 타입 샘플은 `Sources/DelegationClient/main.swift`에서 확인할 수 있습니다.
0 commit comments