|
|
|
@ -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(
|
|
|
|
|