@@ -14,7 +14,6 @@ import TUICore
1414
1515protocol LoginViewDelegate : NSObjectProtocol {
1616 func loginDelegate( userId: String )
17- func testModeSwitchChanged( isOn: Bool )
1817 func autoLoginSwitchChanged( isOn: Bool )
1918}
2019
@@ -68,24 +67,6 @@ class LoginView: UIView {
6867 return textField
6968 } ( )
7069
71- private let testModeView : UIView = {
72- let view = UIView ( frame: . zero)
73- return view
74- } ( )
75-
76- private let testTitleLabel : UILabel = {
77- let label = UILabel ( frame: . zero)
78- label. textColor = . black
79- label. text = " Test Environment " . localized
80- return label
81- } ( )
82-
83- private let testModeSwitch : UISwitch = {
84- let switcher = UISwitch ( frame: . zero)
85- switcher. isOn = false
86- return switcher
87- } ( )
88-
8970 private let autoLoginView : UIView = {
9071 let view = UIView ( frame: . zero)
9172 return view
@@ -159,9 +140,6 @@ class LoginView: UIView {
159140 userIdContentView. addSubview ( userIdTextLable)
160141 userIdContentView. addSubview ( userIdTextField)
161142 addSubview ( loginBtn)
162- addSubview ( testModeView)
163- testModeView. addSubview ( testTitleLabel)
164- testModeView. addSubview ( testModeSwitch)
165143 addSubview ( autoLoginView)
166144 autoLoginView. addSubview ( autoLoginTitleLabel)
167145 autoLoginView. addSubview ( autoLoginSwitch)
@@ -209,26 +187,9 @@ class LoginView: UIView {
209187 make. height. equalTo ( 52 . scale375Height ( ) )
210188 }
211189
212- testModeView. snp. makeConstraints { make in
213- make. trailing. equalToSuperview ( ) . offset ( - 20 . scale375Width ( ) )
214- make. top. equalTo ( loginBtn. snp. bottom) . offset ( 20 . scale375Height ( ) )
215- make. height. equalTo ( 44 . scale375Height ( ) )
216- make. width. greaterThanOrEqualTo ( 120 . scale375Height ( ) )
217- }
218-
219- testModeSwitch. snp. makeConstraints { make in
220- make. trailing. equalToSuperview ( ) . offset ( - 10 . scale375Width ( ) )
221- make. centerY. equalToSuperview ( )
222- }
223-
224- testTitleLabel. snp. makeConstraints { make in
225- make. trailing. equalTo ( testModeSwitch. snp. leading) . offset ( - 20 . scale375Width ( ) )
226- make. leading. centerY. equalToSuperview ( )
227- }
228-
229190 autoLoginView. snp. makeConstraints { make in
230191 make. trailing. equalToSuperview ( ) . offset ( - 20 . scale375Width ( ) )
231- make. top. equalTo ( testModeView . snp. bottom) . offset ( 10 . scale375Height ( ) )
192+ make. top. equalTo ( loginBtn . snp. bottom) . offset ( 20 . scale375Height ( ) )
232193 make. height. equalTo ( 44 . scale375Height ( ) )
233194 make. width. greaterThanOrEqualTo ( 120 . scale375Height ( ) )
234195 }
@@ -246,7 +207,6 @@ class LoginView: UIView {
246207
247208 private func bindInteraction( ) {
248209 loginBtn. addTarget ( self , action: #selector( loginBtnClick) , for: . touchUpInside)
249- testModeSwitch. addTarget ( self , action: #selector( onTestModeSwitchValueChanged) , for: . valueChanged)
250210 autoLoginSwitch. addTarget ( self , action: #selector( onAutoLoginSwitchValueChanged) , for: . valueChanged)
251211 TUICSToastManager . setDefaultPosition ( TUICSToastPositionCenter)
252212 userIdTextField. delegate = self
@@ -262,10 +222,6 @@ class LoginView: UIView {
262222 delegate? . loginDelegate ( userId: userId)
263223 }
264224
265- @objc private func onTestModeSwitchValueChanged( _ switcher: UISwitch ) {
266- delegate? . testModeSwitchChanged ( isOn: switcher. isOn)
267- }
268-
269225 @objc private func onAutoLoginSwitchValueChanged( _ switcher: UISwitch ) {
270226 delegate? . autoLoginSwitchChanged ( isOn: switcher. isOn)
271227 }
0 commit comments