Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions _source/ios/06_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,29 @@ Hotwire.config.makeCustomWebView = { config in
}
```

Customize the native error view with a block, making sure to wrap your custom `View` in `AnyView`:

```swift
Hotwire.config.makeCustomErrorView = { error, handler in
AnyView(ExampleErrorView(error: error, handler: handler))
}

import SwiftUI

struct ExampleErrorView: View {
let error: Error
let handler: ErrorPresenter.Handler?

var body: some View {
Text(error.localizedDescription)

if let handler {
Button("Retry", action: handler)
}
}
}
```

## `NavigatorDelegate`

The delegate is an optional interface you can implement to customize behavior of the `Navigator`.
Expand Down