@@ -18,31 +18,43 @@ final class VCTestingViewController: UIViewController {
1818 view. backgroundColor = . systemBackground
1919 title = " Testing "
2020
21- let button = UIButton ( type: . system)
22- button. frame = CGRect ( x: 0 , y: 0 , width: 100 , height: 50 )
23- button. center = view. center
24- button. setTitle ( " Test MSG " , for: . normal)
25- button. addTarget ( self , action: #selector( sendMessageButtonTapped) , for: . touchUpInside)
26- view. addSubview ( button)
27-
28- let button2 = UIButton ( type: . system)
29- button2. frame = CGRect ( x: 0 , y: button. frame. maxY + 20 , width: 100 , height: 50 )
30- button2. center. x = view. center. x
31- button2. setTitle ( " Make Call " , for: . normal)
32- button2. addTarget ( self , action: #selector( callButtonTapped) , for: . touchUpInside)
33- view. addSubview ( button2)
34-
21+ let textMsgButton = UIButton ( type: . custom)
22+ textMsgButton. frame = CGRect ( x: 0 , y: 0 , width: 100 , height: 50 )
23+ textMsgButton. center = view. center
24+ textMsgButton. setTitle ( " Test MSG " , for: . normal)
25+ textMsgButton. setTitleColor ( . white, for: . normal)
26+ textMsgButton. backgroundColor = . systemBlue
27+ textMsgButton. layer. cornerRadius = 10
28+ textMsgButton. titleLabel? . font = UIFont . systemFont ( ofSize: 17 )
29+ textMsgButton. addTarget ( self , action: #selector( sendMessageButtonTapped) , for: . touchUpInside)
30+ view. addSubview ( textMsgButton)
31+
32+ let makeCallButton = UIButton ( type: . custom)
33+ makeCallButton. frame = CGRect ( x: 0 , y: textMsgButton. frame. maxY + 20 , width: 100 , height: 50 )
34+ makeCallButton. center. x = view. center. x
35+ makeCallButton. setTitle ( " Make Call " , for: . normal)
36+ makeCallButton. setTitleColor ( . white, for: . normal)
37+ makeCallButton. backgroundColor = . systemBlue
38+ makeCallButton. layer. cornerRadius = 10
39+ makeCallButton. titleLabel? . font = UIFont . systemFont ( ofSize: 17 )
40+ makeCallButton. addTarget ( self , action: #selector( callButtonTapped) , for: . touchUpInside)
41+ view. addSubview ( makeCallButton)
42+
3543 // Instantiate countdown view controller and add it as a child view controller
3644 countdownViewController = CountdownViewController ( )
3745 addChild ( countdownViewController)
3846 countdownViewController. didMove ( toParent: self )
39-
40- let button3 = UIButton ( type: . system)
41- button3. frame = CGRect ( x: 0 , y: button2. frame. maxY + 20 , width: 100 , height: 50 )
42- button3. center. x = view. center. x
43- button3. setTitle ( " Countdown " , for: . normal)
44- button3. addTarget ( self , action: #selector( countdownButtonTapped) , for: . touchUpInside)
45- view. addSubview ( button3)
47+
48+ let startCountDownButton = UIButton ( type: . custom)
49+ startCountDownButton. frame = CGRect ( x: 0 , y: makeCallButton. frame. maxY + 20 , width: 100 , height: 50 )
50+ startCountDownButton. center. x = view. center. x
51+ startCountDownButton. setTitle ( " Countdown " , for: . normal)
52+ startCountDownButton. setTitleColor ( . white, for: . normal)
53+ startCountDownButton. backgroundColor = . systemBlue
54+ startCountDownButton. layer. cornerRadius = 10
55+ startCountDownButton. titleLabel? . font = UIFont . systemFont ( ofSize: 17 )
56+ startCountDownButton. addTarget ( self , action: #selector( countdownButtonTapped) , for: . touchUpInside)
57+ view. addSubview ( startCountDownButton)
4658 }
4759
4860 @objc func sendMessageButtonTapped( ) {
0 commit comments