Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iMostfa committed Apr 8, 2024
1 parent 16edf2c commit 7345ab8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,11 @@ Eg. you might want to bind the `UIViewController` to the presenter each-time the
Example:

```swift
let myView = ViewControllerHost(TestViewController())
myView.onInjectionHook = { presenter in
// each time there's a reload, this cloused will be executed
presenter.ui = (myView as? ViewControllerHost<TestViewController>)?.instance
myView.onInjectionHook = { hostedViewController in
//any thing here will be executed each time the controller is reloaded
// for example, you might want to re-assign the controller to your presenter
presenter.ui = hostedViewController
}
```

#### iOS 12
Expand Down

0 comments on commit 7345ab8

Please sign in to comment.