diff --git a/SwiftUITalk.xcodeproj/project.pbxproj b/SwiftUITalk.xcodeproj/project.pbxproj index 929b9be..a18dcfb 100644 --- a/SwiftUITalk.xcodeproj/project.pbxproj +++ b/SwiftUITalk.xcodeproj/project.pbxproj @@ -19,7 +19,6 @@ F6D56759234F1C3600D0417B /* Posts.json in Resources */ = {isa = PBXBuildFile; fileRef = F6D56758234F1C3600D0417B /* Posts.json */; }; F6D5675B234F1C4200D0417B /* DataService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6D5675A234F1C4200D0417B /* DataService.swift */; }; F6E31D78234F41CB00EA19C4 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = F6E31D77234F41CB00EA19C4 /* index.html */; }; - F6E31D7C234F41EA00EA19C4 /* WebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E31D7B234F41EA00EA19C4 /* WebView.swift */; }; F6E31D7E234F43D500EA19C4 /* PostDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E31D7D234F43D500EA19C4 /* PostDetailView.swift */; }; F6E31D82234F4BB000EA19C4 /* Post+Decodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E31D81234F4BB000EA19C4 /* Post+Decodable.swift */; }; F6E31D84234F4BCA00EA19C4 /* Author.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E31D83234F4BCA00EA19C4 /* Author.swift */; }; @@ -40,7 +39,6 @@ F6D56758234F1C3600D0417B /* Posts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Posts.json; sourceTree = ""; }; F6D5675A234F1C4200D0417B /* DataService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataService.swift; sourceTree = ""; }; F6E31D77234F41CB00EA19C4 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; - F6E31D7B234F41EA00EA19C4 /* WebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebView.swift; sourceTree = ""; }; F6E31D7D234F43D500EA19C4 /* PostDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostDetailView.swift; sourceTree = ""; }; F6E31D81234F4BB000EA19C4 /* Post+Decodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Post+Decodable.swift"; sourceTree = ""; }; F6E31D83234F4BCA00EA19C4 /* Author.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Author.swift; sourceTree = ""; }; @@ -106,7 +104,6 @@ F6D56742234E340500D0417B /* LoginView.swift */, F6D56754234F1B9F00D0417B /* BlogListView.swift */, F6E31D7D234F43D500EA19C4 /* PostDetailView.swift */, - F6E31D7B234F41EA00EA19C4 /* WebView.swift */, F6C915EF23699C9500C7E4C8 /* DragRectangleView.swift */, ); path = Views; @@ -213,7 +210,6 @@ F6E31D7E234F43D500EA19C4 /* PostDetailView.swift in Sources */, F6C915F023699C9500C7E4C8 /* DragRectangleView.swift in Sources */, F6D56755234F1B9F00D0417B /* BlogListView.swift in Sources */, - F6E31D7C234F41EA00EA19C4 /* WebView.swift in Sources */, F6D5675B234F1C4200D0417B /* DataService.swift in Sources */, F6D5673F234E340500D0417B /* AppDelegate.swift in Sources */, F6E31D84234F4BCA00EA19C4 /* Author.swift in Sources */, diff --git a/SwiftUITalk/Views/PostDetailView.swift b/SwiftUITalk/Views/PostDetailView.swift index ac753fc..7a2172c 100644 --- a/SwiftUITalk/Views/PostDetailView.swift +++ b/SwiftUITalk/Views/PostDetailView.swift @@ -12,8 +12,7 @@ struct PostDetailView: View { let post: Post var body: some View { - WebView(htmlString: post.prettyHTML, baseURL: URL(string: "https://quickbirdstudios.com/blog")) - .edgesIgnoringSafeArea([.bottom, .top]) + Text("Hello World!") } } diff --git a/SwiftUITalk/Views/WebView.swift b/SwiftUITalk/Views/WebView.swift deleted file mode 100644 index 9450a5b..0000000 --- a/SwiftUITalk/Views/WebView.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// WebView.swift -// SwiftUITalk -// -// Created by Stefan Kofler on 10.10.19. -// Copyright © 2019 QuickBird Studios GmbH. All rights reserved. -// - -import SwiftUI -import UIKit -import WebKit - -struct WebView: UIViewRepresentable { - typealias UIViewType = WKWebView - - let htmlString: String - let baseURL: URL? - - func makeUIView(context: UIViewRepresentableContext) -> WKWebView { - WKWebView() - } - - func updateUIView(_ uiView: WKWebView, context: UIViewRepresentableContext) { - uiView.loadHTMLString(htmlString, baseURL: baseURL) - } -} - -struct WebView_Previews: PreviewProvider { - static var previews: some View { - WebView(htmlString: "Hello World", baseURL: nil) - } -}