|
|
@ -37,17 +37,17 @@ final class DownloadAttachmentModal : Modal {
|
|
|
|
messageLabel.numberOfLines = 0
|
|
|
|
messageLabel.numberOfLines = 0
|
|
|
|
messageLabel.lineBreakMode = .byWordWrapping
|
|
|
|
messageLabel.lineBreakMode = .byWordWrapping
|
|
|
|
messageLabel.textAlignment = .center
|
|
|
|
messageLabel.textAlignment = .center
|
|
|
|
// Unblock button
|
|
|
|
// Download button
|
|
|
|
let unblockButton = UIButton()
|
|
|
|
let downloadButton = UIButton()
|
|
|
|
unblockButton.set(.height, to: Values.mediumButtonHeight)
|
|
|
|
downloadButton.set(.height, to: Values.mediumButtonHeight)
|
|
|
|
unblockButton.layer.cornerRadius = Modal.buttonCornerRadius
|
|
|
|
downloadButton.layer.cornerRadius = Modal.buttonCornerRadius
|
|
|
|
unblockButton.backgroundColor = Colors.buttonBackground
|
|
|
|
downloadButton.backgroundColor = Colors.buttonBackground
|
|
|
|
unblockButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize)
|
|
|
|
downloadButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize)
|
|
|
|
unblockButton.setTitleColor(Colors.text, for: UIControl.State.normal)
|
|
|
|
downloadButton.setTitleColor(Colors.text, for: UIControl.State.normal)
|
|
|
|
unblockButton.setTitle("Download", for: UIControl.State.normal)
|
|
|
|
downloadButton.setTitle("Download", for: UIControl.State.normal)
|
|
|
|
unblockButton.addTarget(self, action: #selector(trust), for: UIControl.Event.touchUpInside)
|
|
|
|
downloadButton.addTarget(self, action: #selector(trust), for: UIControl.Event.touchUpInside)
|
|
|
|
// Button stack view
|
|
|
|
// Button stack view
|
|
|
|
let buttonStackView = UIStackView(arrangedSubviews: [ cancelButton, unblockButton ])
|
|
|
|
let buttonStackView = UIStackView(arrangedSubviews: [ cancelButton, downloadButton ])
|
|
|
|
buttonStackView.axis = .horizontal
|
|
|
|
buttonStackView.axis = .horizontal
|
|
|
|
buttonStackView.spacing = Values.mediumSpacing
|
|
|
|
buttonStackView.spacing = Values.mediumSpacing
|
|
|
|
buttonStackView.distribution = .fillEqually
|
|
|
|
buttonStackView.distribution = .fillEqually
|
|
|
|