Squash
This commit is contained in:
26
Clemens Playground/Views/WebViews/NewWebView.swift
Normal file
26
Clemens Playground/Views/WebViews/NewWebView.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// NewWebView.swift
|
||||
// Clemens Playground
|
||||
//
|
||||
// Created by Maximilian Roider on 14.11.25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import WebKit
|
||||
|
||||
//struct NewWebView: View {
|
||||
//
|
||||
// @State private var page = WebPage()
|
||||
// private let url: String
|
||||
//
|
||||
// init(_ url: String) {
|
||||
// self.url = url
|
||||
// }
|
||||
//
|
||||
// var body: some View {
|
||||
// WebView(page)
|
||||
// .onAppear {
|
||||
// page.load(URLRequest(url: URL(string: url)!))
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
27
Clemens Playground/Views/WebViews/OldWebView.swift
Normal file
27
Clemens Playground/Views/WebViews/OldWebView.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// OldWebview.swift
|
||||
// Clemens Playground
|
||||
//
|
||||
// Created by Maximilian Roider on 14.11.25.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
import WebKit
|
||||
|
||||
struct OldWebView: UIViewRepresentable {
|
||||
private let url: String
|
||||
|
||||
init(_ url: String) {
|
||||
self.url = url
|
||||
}
|
||||
|
||||
func makeUIView(context: Context) -> some UIView {
|
||||
let webView = WKWebView()
|
||||
webView.load(URLRequest(url: URL(string: url)!))
|
||||
|
||||
return webView
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: UIViewType, context: Context) {}
|
||||
}
|
||||
Reference in New Issue
Block a user