pushdeer/ios/PushDeer-iOS/PushDeer/Common/SafariView.swift
hext 69ec4f3774 mac版本支持右键删除消息
应用内打开网页使用 BetterSafariView
修复markdown中图片出现相对路径时, 界面会卡死的问题
2022-03-30 01:45:02 +08:00

25 lines
507 B
Swift

//
// SafariView.swift
// PushDeer
//
// Created by HEXT on 2022/2/27.
//
import SwiftUI
import SafariServices
struct HSafariView: UIViewControllerRepresentable {
let url: URL
func makeUIViewController(context: Context) -> SFSafariViewController {
let safariVC = SFSafariViewController.init(url: url)
safariVC.dismissButtonStyle = .close
return safariVC
}
func updateUIViewController(_ uiViewController: SFSafariViewController, context: Context) {
// update code
}
}