@@ -17,7 +17,7 @@ protocol Overlayable
1717class WindowUtil : Overlayable
1818{
1919 var overlayWindow = UIWindow ( frame: CGRect ( x: 0 , y: 0 , width: UIScreen . main. bounds. width, height: 30 ) )
20- var stopButton = UIButton ( type: UIButtonType . custom)
20+ var stopButton = UIButton ( type: UIButton . ButtonType . custom)
2121 var stopButtonColor = UIColor ( red: 0.30 , green: 0.67 , blue: 0.99 , alpha: 1.00 )
2222 var onStopClick : ( ( ) -> ( ) ) ?
2323
@@ -29,7 +29,7 @@ class WindowUtil: Overlayable
2929 func initViews( )
3030 {
3131 overlayWindow = UIWindow ( frame: CGRect ( x: 0 , y: 0 , width: UIScreen . main. bounds. width, height: 30 ) )
32- stopButton = UIButton ( type: UIButtonType . custom)
32+ stopButton = UIButton ( type: UIButton . ButtonType . custom)
3333 }
3434
3535 func hide( )
@@ -55,13 +55,13 @@ class WindowUtil: Overlayable
5555 stopButton. setTitle ( " Stop Recording " , for: . normal)
5656 stopButton. titleLabel? . font = UIFont . systemFont ( ofSize: UIFont . smallSystemFontSize)
5757
58- stopButton. addTarget ( self , action: #selector( stopRecording) , for: UIControlEvents . touchDown)
58+ stopButton. addTarget ( self , action: #selector( stopRecording) , for: UIControl . Event . touchDown)
5959
6060
6161
6262 stopButton. frame = overlayWindow. frame
6363 overlayWindow. addSubview ( stopButton)
64- overlayWindow. windowLevel = CGFloat . greatestFiniteMagnitude
64+ overlayWindow. windowLevel = UIWindow . Level ( rawValue : CGFloat . greatestFiniteMagnitude)
6565
6666 }
6767
0 commit comments