|
|
|
@ -104,8 +104,8 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate {
|
|
|
|
|
|
|
|
|
|
private func setUpViewHierarchy() {
|
|
|
|
|
self.clipsToBounds = true
|
|
|
|
|
self.layer.cornerRadius = Values.largeSpacing
|
|
|
|
|
self.set(.height, to: 100)
|
|
|
|
|
self.layer.cornerRadius = 16
|
|
|
|
|
self.set(.height, to: 80)
|
|
|
|
|
|
|
|
|
|
addSubview(backgroundView)
|
|
|
|
|
backgroundView.pin(to: self)
|
|
|
|
@ -125,8 +125,8 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate {
|
|
|
|
|
stackView.spacing = Values.largeSpacing
|
|
|
|
|
self.addSubview(stackView)
|
|
|
|
|
|
|
|
|
|
stackView.center(.vertical, in: self)
|
|
|
|
|
stackView.set(.width, to: .width, of: self, withOffset: Values.mediumSpacing)
|
|
|
|
|
stackView.center(in: self)
|
|
|
|
|
stackView.set(.width, to: .width, of: self, withOffset: -Values.mediumSpacing)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private func setUpGestureRecognizers() {
|
|
|
|
@ -222,8 +222,9 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate {
|
|
|
|
|
window.addSubview(self)
|
|
|
|
|
|
|
|
|
|
let topMargin = window.safeAreaInsets.top - Values.smallSpacing
|
|
|
|
|
self.set(.width, to: .width, of: window, withOffset: Values.smallSpacing)
|
|
|
|
|
self.set(.width, to: .width, of: window, withOffset: -Values.smallSpacing)
|
|
|
|
|
self.pin(.top, to: .top, of: window, withInset: topMargin)
|
|
|
|
|
self.center(.horizontal, in: window)
|
|
|
|
|
|
|
|
|
|
UIView.animate(withDuration: 0.5, delay: 0, options: [], animations: {
|
|
|
|
|
self.alpha = 1.0
|
|
|
|
|