Created
April 17, 2021 10:28
-
-
Save isaac-weisberg/0eeb7b717766c35162143f9501feb43d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TransactionCellView: UIView { | |
// ... other members omitted ... | |
let acceptButton = TransactionCellAcceptButton() | |
var iconToBottomConstraint: NSLayoutConstraint! | |
var acceptButtonToBottomConstraint: NSLayoutConstraint! | |
init(viewModel: TransactionCellViewModel) { | |
// ... omitted configuration of the view style ... | |
// ... omitted AutoLayout code ... | |
// ... omitted configuration of memembers ... | |
let shouldShowAcceptButton = viewModel.shouldShowAcceptButton | |
acceptButton.isHidden = !shouldShowAcceptButton | |
iconToBottomConstraint.isActive = !shouldShowAcceptButton | |
acceptButtonToBottomConstraint.isActive = shouldShowAcceptButton | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment