Add RequestContactsAccessFooterView.

Update InviteFriendsHeaderView and StartChatViewController styles to match Figma doc.
This commit is contained in:
Doug
2021-07-23 16:43:39 +01:00
parent a980d727d0
commit b881c8efdb
7 changed files with 280 additions and 40 deletions
@@ -50,27 +50,30 @@ final class InviteFriendsHeaderView: UIView, NibLoadable, Themable {
override func awakeFromNib() {
super.awakeFromNib()
self.button.setTitle(VectorL10n.inviteFriendsAction(BuildSettings.bundleDisplayName), for: .normal)
self.button.addTarget(self, action: #selector(buttonAction), for: .touchUpInside)
button.setTitle(VectorL10n.inviteFriendsAction(BuildSettings.bundleDisplayName), for: .normal)
button.addTarget(self, action: #selector(buttonAction), for: .touchUpInside)
button.layer.cornerRadius = 8
button.layer.borderWidth = 2
}
// MARK: - Public
func update(theme: Theme) {
self.backgroundColor = theme.backgroundColor
backgroundColor = theme.backgroundColor
self.button.setTitleColor(theme.baseTextPrimaryColor, for: .normal)
self.button.setTitleColor(theme.baseTextPrimaryColor.withAlphaComponent(Constants.buttonHighlightedAlpha), for: .highlighted)
self.button.vc_setBackgroundColor(theme.tintColor, for: .normal)
button.layer.borderColor = theme.tintColor.cgColor
button.setTitleColor(theme.tintColor, for: .normal)
button.setTitleColor(theme.tintColor.withAlphaComponent(Constants.buttonHighlightedAlpha), for: .highlighted)
button.vc_setBackgroundColor(theme.backgroundColor, for: .normal)
let buttonImage = Asset.Images.shareActionButton.image.vc_tintedImage(usingColor: theme.baseIconPrimaryColor)
let buttonImage = Asset.Images.shareActionButton.image.vc_tintedImage(usingColor: theme.tintColor)
self.button.setImage(buttonImage, for: .normal)
button.setImage(buttonImage, for: .normal)
}
// MARK: - Action
@objc private func buttonAction(_ sender: UIButton) {
self.delegate?.inviteFriendsHeaderView(self, didTapButton: button)
delegate?.inviteFriendsHeaderView(self, didTapButton: button)
}
}