Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson committed Jan 10, 2021
1 parent 556955c commit a67dcaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ import SwiftUI
import WebView

struct ContentView: View {
@ObservedObject var webViewStore = WebViewStore()
@StateObject var webViewStore = WebViewStore()

var body: some View {
NavigationView {
WebView(webView: webViewStore.webView)
.navigationBarTitle(Text(verbatim: webViewStore.webView.title ?? ""), displayMode: .inline)
.navigationBarTitle(Text(verbatim: webViewStore.title ?? ""), displayMode: .inline)
.navigationBarItems(trailing: HStack {
Button(action: goBack) {
Image(systemName: "chevron.left")
.imageScale(.large)
.aspectRatio(contentMode: .fit)
.frame(width: 32, height: 32)
}.disabled(!webViewStore.webView.canGoBack)
}.disabled(!webViewStore.canGoBack)
Button(action: goForward) {
Image(systemName: "chevron.right")
.imageScale(.large)
.aspectRatio(contentMode: .fit)
.frame(width: 32, height: 32)
}.disabled(!webViewStore.webView.canGoForward)
}.disabled(!webViewStore.canGoForward)
})
}.onAppear {
self.webViewStore.webView.load(URLRequest(url: URL(string: "https://apple.com")!))
Expand Down

0 comments on commit a67dcaf

Please sign in to comment.