Skip to content

Commit

Permalink
README update
Browse files Browse the repository at this point in the history
  • Loading branch information
ghvg1313 committed Sep 27, 2017
1 parent 027ac3b commit 04d9ac4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Yoshi/QAKit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@ Then, register the callback and environments to the environment manager.

```swift

// If you want to get the callback when environment is initialized, register the callback when initializing the manager.
let environmentManager = YoshiEnvironmentManager(environments: environmentOptions) { (environment) in
/// Do something when environment is changed.
}

// Or, you can register the callback separately.
// Notice that this way callback won't be invoked when environment is retrieved from the archive.
environmentManager.onEnvironmentChange = { (environment) in
/// Do something when environment is changed.
}

```

Finally, construct the environment menu and setup it up like other Yoshi menus:
Expand Down

0 comments on commit 04d9ac4

Please sign in to comment.