@@ -29,12 +29,16 @@ open class TopView: UIView {
2929 button. titleLabel? . font = self . configuration. flashButton
3030 button. addTarget ( self , action: #selector( flashButtonDidPress ( _: ) ) , for: . touchUpInside)
3131 button. contentHorizontalAlignment = . left
32+ button. accessibilityLabel = " Flash mode is auto "
33+ button. accessibilityHint = " Double-tap to change flash mode "
3234
3335 return button
3436 } ( )
3537
3638 open lazy var rotateCamera : UIButton = { [ unowned self] in
3739 let button = UIButton ( )
40+ button. accessibilityLabel = " "
41+ button. accessibilityHint = " Double-tap to rotate camera "
3842 button. setImage ( AssetManager . getImage ( " cameraIcon " ) , for: UIControlState ( ) )
3943 button. addTarget ( self , action: #selector( rotateCameraButtonDidPress ( _: ) ) , for: . touchUpInside)
4044 button. imageView? . contentMode = . center
@@ -94,6 +98,7 @@ open class TopView: UIView {
9498 case 1 :
9599 button. setTitleColor ( UIColor ( red: 0.98 , green: 0.98 , blue: 0.45 , alpha: 1 ) , for: UIControlState ( ) )
96100 button. setTitleColor ( UIColor ( red: 0.52 , green: 0.52 , blue: 0.24 , alpha: 1 ) , for: . highlighted)
101+
97102 default :
98103 button. setTitleColor ( UIColor . white, for: UIControlState ( ) )
99104 button. setTitleColor ( UIColor . white, for: . highlighted)
@@ -103,6 +108,7 @@ open class TopView: UIView {
103108
104109 button. setImage ( AssetManager . getImage ( newTitle) , for: UIControlState ( ) )
105110 button. setTitle ( newTitle, for: UIControlState ( ) )
111+ button. accessibilityLabel = " Flash mode is \( newTitle) "
106112
107113 delegate? . flashButtonDidPress ( newTitle)
108114 }
0 commit comments