Added the attribution label to the paths screen

pull/986/head
Morgan Pretty 1 year ago
parent 201659728f
commit 6c9f4b506d

@ -98,12 +98,26 @@ final class PathVC: BaseVC {
let inset: CGFloat = isIPhone5OrSmaller ? 64 : 80
let learnMoreButtonContainer = UIView(wrapping: learnMoreButton, withInsets: UIEdgeInsets(top: 0, leading: inset, bottom: 0, trailing: inset), shouldAdaptForIPadWithWidth: Values.iPadButtonWidth)
let attributionSpacer = UIView()
attributionSpacer.setContentHuggingPriority(.required, for: .vertical)
attributionSpacer.setContentCompressionResistancePriority(.required, for: .vertical)
attributionSpacer.set(.height, to: Values.smallSpacing)
let attributionLabel = UILabel()
attributionLabel.font = .systemFont(ofSize: Values.verySmallFontSize)
attributionLabel.text = "Path location data provided by MaxMind"
attributionLabel.themeTextColor = .textSecondary
attributionLabel.textAlignment = .center
attributionLabel.lineBreakMode = .byWordWrapping
attributionLabel.numberOfLines = 0
// Set up spacers
let topSpacer = UIView.vStretchingSpacer()
let bottomSpacer = UIView.vStretchingSpacer()
// Set up main stack view
let mainStackView = UIStackView(arrangedSubviews: [ explanationLabel, topSpacer, pathStackViewContainer, bottomSpacer, learnMoreButtonContainer ])
let mainStackView = UIStackView(arrangedSubviews: [ explanationLabel, topSpacer, pathStackViewContainer, attributionSpacer, attributionLabel, bottomSpacer, learnMoreButtonContainer ])
mainStackView.axis = .vertical
mainStackView.alignment = .fill
mainStackView.layoutMargins = UIEdgeInsets(

Loading…
Cancel
Save