@ -17,6 +17,7 @@ public class ReturnToCallViewController: UIViewController {
let returnToCallLabel = UILabel ( )
let returnToCallLabel = UILabel ( )
public func startAnimating ( ) {
public func startAnimating ( ) {
NotificationCenter . default . addObserver ( self , selector : #selector ( didTapStatusBar ( notification : ) ) , name : . TappedStatusBar , object : nil )
self . returnToCallLabel . layer . removeAllAnimations ( )
self . returnToCallLabel . layer . removeAllAnimations ( )
self . returnToCallLabel . alpha = 1
self . returnToCallLabel . alpha = 1
UIView . animate ( withDuration : 1 ,
UIView . animate ( withDuration : 1 ,
@ -27,6 +28,7 @@ public class ReturnToCallViewController: UIViewController {
}
}
public func stopAnimating ( ) {
public func stopAnimating ( ) {
NotificationCenter . default . removeObserver ( self , name : . TappedStatusBar , object : nil )
self . returnToCallLabel . layer . removeAllAnimations ( )
self . returnToCallLabel . layer . removeAllAnimations ( )
}
}
@ -56,6 +58,11 @@ public class ReturnToCallViewController: UIViewController {
self . delegate ? . returnToCallWasTapped ( self )
self . delegate ? . returnToCallWasTapped ( self )
}
}
@objc
public func didTapStatusBar ( notification : Notification ) {
self . delegate ? . returnToCallWasTapped ( self )
}
override public func viewWillLayoutSubviews ( ) {
override public func viewWillLayoutSubviews ( ) {
Logger . debug ( " \( self . logTag ) in \( #function ) " )
Logger . debug ( " \( self . logTag ) in \( #function ) " )