We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 027ac3b commit 04d9ac4Copy full SHA for 04d9ac4
1 file changed
Yoshi/QAKit/README.md
@@ -32,10 +32,17 @@ Then, register the callback and environments to the environment manager.
32
33
```swift
34
35
+// If you want to get the callback when environment is initialized, register the callback when initializing the manager.
36
let environmentManager = YoshiEnvironmentManager(environments: environmentOptions) { (environment) in
37
/// Do something when environment is changed.
38
}
39
40
+// Or, you can register the callback separately.
41
+// Notice that this way callback won't be invoked when environment is retrieved from the archive.
42
+environmentManager.onEnvironmentChange = { (environment) in
43
+ /// Do something when environment is changed.
44
+}
45
+
46
```
47
48
Finally, construct the environment menu and setup it up like other Yoshi menus:
0 commit comments