COVIDSafe code from version 1.7 (#8)

This commit is contained in:
COVIDSafe Support 2020-07-03 14:26:13 +10:00 committed by GitHub
parent 2063cea613
commit 6f92ff8fb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 4504 additions and 1281 deletions

View file

@ -31,14 +31,15 @@ class OnboardingStep2bViewController: UIViewController {
let pointThreeText = NSMutableAttributedString(string: NSLocalizedString("OS2b_Item3", comment: "COVIDSafe does NOT send pairing requests"),
attributes: labelAtt)
let learnMoreRange = pointThreeText.string.range(of: NSLocalizedString("OS2b_Item3Underline", comment: "Text that should be underlined from PointThree"))!
let nsRange = NSRange(learnMoreRange, in: pointThreeText.string)
pointThreeText.addAttributes([.underlineStyle: NSUnderlineStyle.single.rawValue, .foregroundColor: UIColor.covidSafeColor], range: nsRange)
pointThreeLabel.attributedText = pointThreeText
if let learnMoreRange = pointThreeText.string.range(of: NSLocalizedString("OS2b_Item3Underline", comment: "Text that should be underlined from PointThree")) {
let nsRange = NSRange(learnMoreRange, in: pointThreeText.string)
pointThreeText.addAttributes([.underlineStyle: NSUnderlineStyle.single.rawValue, .foregroundColor: UIColor.covidSafeColor], range: nsRange)
pointThreeLabel.attributedText = pointThreeText
}
}
@IBAction func learnMoreTapped(_ sender: Any) {
guard let url = URL(string: "https://www.covidsafe.gov.au/help-topics.html#bluetooth-pairing-request") else {
guard let url = URL(string: "\(URLHelper.getHelpURL())#bluetooth-pairing-request") else {
return
}