mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-06 06:44:58 +00:00
27 lines
687 B
Swift
27 lines
687 B
Swift
![]() |
//
|
||
|
// ExternalLinkTableViewCell.swift
|
||
|
// CovidSafe
|
||
|
//
|
||
|
// Copyright © 2020 Australian Government. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import UIKit
|
||
|
import SafariServices
|
||
|
|
||
|
class ExternalLinkTableViewCell: UITableViewCell {
|
||
|
|
||
|
@IBOutlet weak var cellImage: UIImageView!
|
||
|
@IBOutlet weak var linkDescription: UILabel!
|
||
|
var externalLinkURL: URL?
|
||
|
|
||
|
@IBAction func openExternalLinkTapped(_ sender: Any) {
|
||
|
guard let linkToOpen = externalLinkURL else {
|
||
|
return
|
||
|
}
|
||
|
|
||
|
let safariVC = SFSafariViewController(url: linkToOpen)
|
||
|
UIApplication.shared.keyWindow?.rootViewController?.present(safariVC, animated: true, completion: nil)
|
||
|
|
||
|
}
|
||
|
}
|