mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 21:15:21 +00:00
COVIDSafe code from version 2.4 (#45)
This commit is contained in:
parent
f14aa60482
commit
377bc0009b
63 changed files with 3096 additions and 372 deletions
48
CovidSafe/CovidHeaderContentViewController.swift
Normal file
48
CovidSafe/CovidHeaderContentViewController.swift
Normal file
|
@ -0,0 +1,48 @@
|
|||
//
|
||||
// CovidHeaderContentViewController.swift
|
||||
// CovidSafe
|
||||
//
|
||||
// Copyright © 2021 Australian Government. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class CovidHeaderContentViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var contentContainer: UIView!
|
||||
@IBOutlet weak var titleLabel: UILabel!
|
||||
@IBOutlet weak var subtitleLabel: UILabel!
|
||||
@IBOutlet weak var backButtonContainer: UIView!
|
||||
|
||||
var hideBackButton = true
|
||||
var hideSubtitle = true
|
||||
|
||||
var titleString: String?
|
||||
var subtitleString: String?
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
subtitleLabel.isHidden = hideSubtitle
|
||||
backButtonContainer.isHidden = hideBackButton
|
||||
|
||||
titleLabel.text = titleString
|
||||
subtitleLabel.text = subtitleString
|
||||
}
|
||||
|
||||
func setupContentView(contentView: UIView) {
|
||||
contentView.translatesAutoresizingMaskIntoConstraints = false
|
||||
contentContainer.addSubview(contentView)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
contentView.leadingAnchor.constraint(equalTo: contentContainer.leadingAnchor),
|
||||
contentView.trailingAnchor.constraint(equalTo: contentContainer.trailingAnchor),
|
||||
contentView.topAnchor.constraint(equalTo: contentContainer.topAnchor),
|
||||
contentView.bottomAnchor.constraint(equalTo: contentContainer.bottomAnchor)
|
||||
])
|
||||
|
||||
}
|
||||
@IBAction func backButtonTapped(_ sender: Any) {
|
||||
navigationController?.popViewController(animated: true)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue