Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 57 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 57 Rev 58
Línea 8... Línea 8...
8
import SafariServices
8
import SafariServices
9
import UIKit
9
import UIKit
10
import SwiftUI
10
import SwiftUI
Línea 11... Línea 11...
11
 
11
 
-
 
12
struct SafariView: UIViewControllerRepresentable {
-
 
13
    private var  sURL  : String
-
 
14
    
-
 
15
    init (sURL : String)
-
 
16
    {
12
struct SafariView: UIViewControllerRepresentable {
17
        print("SafariView sURL1 : \(sURL)")
-
 
18
        self.sURL = sURL
13
    var url: URL
19
    }
14
        
20
    
-
 
21
    func makeUIViewController(context: UIViewControllerRepresentableContext<SafariView>) -> SFSafariViewController {
-
 
22
        print("SafariView sURL2 : \(sURL)")
15
    func makeUIViewController(context: UIViewControllerRepresentableContext<SafariView>) -> SFSafariViewController {
23
        let url = URL(string: sURL)
Línea 16... Línea 24...
16
        let safariView = SFSafariViewController(url: url)
24
        let safariView = SFSafariViewController(url: url!)
17
        
25
        
18
        // We want our view to have a close button instead of 'done'
26
        // We want our view to have a close button instead of 'done'
19
        safariView.dismissButtonStyle = .close
27
        safariView.dismissButtonStyle = .close