|
|
@ -8,6 +8,8 @@ class SendHeaderView: UIView { |
|
|
|
let issuerLabel = UILabel() |
|
|
|
let issuerLabel = UILabel() |
|
|
|
|
|
|
|
|
|
|
|
let middleBorder = UIView() |
|
|
|
let middleBorder = UIView() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var footerStackView: UIStackView? |
|
|
|
let valuePercentageChangeValueLabel = UILabel() |
|
|
|
let valuePercentageChangeValueLabel = UILabel() |
|
|
|
let valuePercentageChangePeriodLabel = UILabel() |
|
|
|
let valuePercentageChangePeriodLabel = UILabel() |
|
|
|
let valueChangeLabel = UILabel() |
|
|
|
let valueChangeLabel = UILabel() |
|
|
@ -36,19 +38,19 @@ class SendHeaderView: UIView { |
|
|
|
|
|
|
|
|
|
|
|
let footerNamesStack = [valuePercentageChangePeriodLabel, valueChangeNameLabel, valueNameLabel].asStackView(distribution: .fillEqually, spacing: 15) |
|
|
|
let footerNamesStack = [valuePercentageChangePeriodLabel, valueChangeNameLabel, valueNameLabel].asStackView(distribution: .fillEqually, spacing: 15) |
|
|
|
|
|
|
|
|
|
|
|
let footerStackView = [ |
|
|
|
footerStackView = [ |
|
|
|
middleBorder, |
|
|
|
|
|
|
|
.spacer(height: 14), |
|
|
|
.spacer(height: 14), |
|
|
|
footerValuesStack, |
|
|
|
footerValuesStack, |
|
|
|
footerNamesStack, |
|
|
|
footerNamesStack, |
|
|
|
].asStackView(axis: .vertical, perpendicularContentHuggingPriority: .defaultLow) |
|
|
|
].asStackView(axis: .vertical, perpendicularContentHuggingPriority: .defaultLow) |
|
|
|
footerStackView.translatesAutoresizingMaskIntoConstraints = false |
|
|
|
footerStackView?.translatesAutoresizingMaskIntoConstraints = false |
|
|
|
|
|
|
|
|
|
|
|
let stackView = [ |
|
|
|
let stackView = [ |
|
|
|
titleLabel, |
|
|
|
titleLabel, |
|
|
|
bottomRowStack, |
|
|
|
bottomRowStack, |
|
|
|
.spacer(height: 7), |
|
|
|
.spacer(height: 7), |
|
|
|
footerStackView, |
|
|
|
middleBorder, |
|
|
|
|
|
|
|
footerStackView!, |
|
|
|
].asStackView(axis: .vertical) |
|
|
|
].asStackView(axis: .vertical) |
|
|
|
stackView.translatesAutoresizingMaskIntoConstraints = false |
|
|
|
stackView.translatesAutoresizingMaskIntoConstraints = false |
|
|
|
background.addSubview(stackView) |
|
|
|
background.addSubview(stackView) |
|
|
@ -117,5 +119,7 @@ class SendHeaderView: UIView { |
|
|
|
valueLabel.textColor = viewModel.textColor |
|
|
|
valueLabel.textColor = viewModel.textColor |
|
|
|
valueLabel.font = viewModel.textValueFont |
|
|
|
valueLabel.font = viewModel.textValueFont |
|
|
|
valueLabel.text = viewModel.value |
|
|
|
valueLabel.text = viewModel.value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
footerStackView?.isHidden = !viewModel.showAlternativeAmount |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|