using wkwebview - i dont like how it turned out...

takes a second to load and has a white bg :(
This commit is contained in:
neon443
2025-11-20 20:19:13 +00:00
parent c5eb71fc6c
commit ccadff053e
4 changed files with 63 additions and 22 deletions

View File

@@ -0,0 +1,33 @@
//
// GifView.swift
// StickerSlack
//
// Created by neon443 on 20/11/2025.
//
import Foundation
import UIKit
import SwiftUI
import WebKit
struct GifView: UIViewRepresentable {
private let url: URL
init(url: URL) {
self.url = url
}
func makeUIView(context: Context) -> WKWebView {
let webview = WKWebView()
webview.allowsLinkPreview = false
webview.allowsBackForwardNavigationGestures = false
webview.load(URLRequest(url: url))
return webview
}
func updateUIView(_ uiView: WKWebView, context: Context) {
uiView.reload()
}
}