mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-29 18:05:17 +00:00
COVIDSafe code from version 2.2
This commit is contained in:
parent
9e6e4604ef
commit
682e02ddc9
67 changed files with 3645 additions and 464 deletions
26
CovidSafe/ExternalLinkTableViewCell.swift
Normal file
26
CovidSafe/ExternalLinkTableViewCell.swift
Normal file
|
@ -0,0 +1,26 @@
|
|||
//
|
||||
// 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)
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue