Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private func showWarningView() {
- DispatchQueue.main.async { [weak self] in
- guard let self = self else { return }
- var newConstant: CGFloat!
- if self.warningViewTopConstraint.constant == 0.0 {
- newConstant = 100.0
- } else {
- newConstant = 0.0
- }
- self.warningViewTopConstraint.constant = newConstant
- UIView.animate(withDuration: 0.25, delay: 0.0, options: .curveEaseIn, animations: { [weak self] in
- guard let self = self else { return }
- self.view.layoutIfNeeded()
- }, completion: nil)
- }
- }
Add Comment
Please, Sign In to add comment