Proyectos de Subversion Iphone Microlearning - Inconcert

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
11 efrain 1
//
2
//  SafariView.swift
3
//  twogetskills
4
//
5
//  Created by Efrain Yanez Recanatini on 8/28/22.
6
//
7
 
8
import SafariServices
9
import UIKit
10
import SwiftUI
11
 
12
struct SafariView: UIViewControllerRepresentable {
13
    private var  sURL  : String
14
 
15
    init (sURL : String)
16
    {
17
        print("SafariView sURL1 : \(sURL)")
18
        self.sURL = sURL
19
    }
20
 
21
    func makeUIViewController(context: UIViewControllerRepresentableContext<SafariView>) -> SFSafariViewController {
22
        print("SafariView sURL2 : \(sURL)")
23
        let url = URL(string: sURL)
24
        let safariView = SFSafariViewController(url: url!)
25
 
26
        // We want our view to have a close button instead of 'done'
27
        safariView.dismissButtonStyle = .close
28
        return safariView
29
    }
30
 
31
    func updateUIViewController(_ uiViewController: SFSafariViewController, context: UIViewControllerRepresentableContext<SafariView>) {
32
 
33
    }
34
}
35