@@ -93,13 +93,13 @@ - (void)viewDidDisappear:(BOOL)animated
93
93
- (void )loadCredentialsStackViewInView : (UIView *)view
94
94
{
95
95
UIStackView *credentialsStackView = [[UIStackView alloc ] init ];
96
- credentialsStackView.translatesAutoresizingMaskIntoConstraints = NO ;
97
96
credentialsStackView.axis = UILayoutConstraintAxisVertical;
98
97
credentialsStackView.alignment = UIStackViewAlignmentCenter;
99
98
credentialsStackView.distribution = UIStackViewDistributionFill;
100
99
credentialsStackView.spacing = 40 .f ;
101
100
[view addSubview: credentialsStackView];
102
101
102
+ credentialsStackView.translatesAutoresizingMaskIntoConstraints = NO ;
103
103
[NSLayoutConstraint activateConstraints: @[
104
104
[credentialsStackView.centerXAnchor constraintEqualToAnchor: view.centerXAnchor],
105
105
[credentialsStackView.centerYAnchor constraintEqualToAnchor: view.centerYAnchor],
@@ -125,10 +125,10 @@ - (void)loadFixedSpacerWithHeight:(CGFloat)height inStackView:(UIStackView *)sta
125
125
{
126
126
// Zero height, but adds two stack spacing contributions and thus some spacing
127
127
UIView *spacerView = [[UIView alloc ] init ];
128
- spacerView.translatesAutoresizingMaskIntoConstraints = NO ;
129
128
spacerView.backgroundColor = UIColor.clearColor ;
130
129
[stackView addArrangedSubview: spacerView];
131
130
131
+ spacerView.translatesAutoresizingMaskIntoConstraints = NO ;
132
132
[NSLayoutConstraint activateConstraints: @[
133
133
[spacerView.widthAnchor constraintEqualToAnchor: stackView.widthAnchor],
134
134
[spacerView.heightAnchor constraintEqualToConstant: height]
@@ -138,7 +138,6 @@ - (void)loadFixedSpacerWithHeight:(CGFloat)height inStackView:(UIStackView *)sta
138
138
- (void )loadEmailAddressTextFieldInStackView : (UIStackView *)stackView
139
139
{
140
140
UITextField *emailAddressTextField = [[UITextField alloc ] init ];
141
- emailAddressTextField.translatesAutoresizingMaskIntoConstraints = NO ;
142
141
emailAddressTextField.text = self.emailAddress ;
143
142
emailAddressTextField.placeholder = SRGIdentityLocalizedString (@" Email address" , @" Email address text field placeholder on Apple TV" );
144
143
emailAddressTextField.font = [SRGFont fontWithStyle: SRGFontStyleButton];
@@ -148,6 +147,7 @@ - (void)loadEmailAddressTextFieldInStackView:(UIStackView *)stackView
148
147
[stackView addArrangedSubview: emailAddressTextField];
149
148
self.emailAddressTextField = emailAddressTextField;
150
149
150
+ emailAddressTextField.translatesAutoresizingMaskIntoConstraints = NO ;
151
151
[NSLayoutConstraint activateConstraints: @[
152
152
[emailAddressTextField.widthAnchor constraintEqualToAnchor: stackView.widthAnchor],
153
153
[emailAddressTextField.heightAnchor constraintEqualToConstant: 70 .f]
@@ -157,7 +157,6 @@ - (void)loadEmailAddressTextFieldInStackView:(UIStackView *)stackView
157
157
- (void )loadPasswordTextFieldInStackView : (UIStackView *)stackView
158
158
{
159
159
UITextField *passwordTextField = [[UITextField alloc ] init ];
160
- passwordTextField.translatesAutoresizingMaskIntoConstraints = NO ;
161
160
passwordTextField.delegate = self;
162
161
passwordTextField.placeholder = SRGIdentityLocalizedString (@" Password" , @" Password text field placeholder on Apple TV" );
163
162
passwordTextField.font = [SRGFont fontWithStyle: SRGFontStyleButton];
@@ -167,6 +166,7 @@ - (void)loadPasswordTextFieldInStackView:(UIStackView *)stackView
167
166
[stackView addArrangedSubview: passwordTextField];
168
167
self.passwordTextField = passwordTextField;
169
168
169
+ passwordTextField.translatesAutoresizingMaskIntoConstraints = NO ;
170
170
[NSLayoutConstraint activateConstraints: @[
171
171
[passwordTextField.widthAnchor constraintEqualToAnchor: stackView.widthAnchor],
172
172
[passwordTextField.heightAnchor constraintEqualToConstant: 70 .f]
@@ -186,12 +186,12 @@ - (void)loadLoginButtonInStackView:(UIStackView *)stackView
186
186
- (void )loadInstructionsStackViewInView : (UIView *)view
187
187
{
188
188
UIStackView *instructionsStackView = [[UIStackView alloc ] init ];
189
- instructionsStackView.translatesAutoresizingMaskIntoConstraints = NO ;
190
189
instructionsStackView.axis = UILayoutConstraintAxisVertical;
191
190
instructionsStackView.alignment = UIStackViewAlignmentFill;
192
191
instructionsStackView.distribution = UIStackViewDistributionFill;
193
192
[view addSubview: instructionsStackView];
194
193
194
+ instructionsStackView.translatesAutoresizingMaskIntoConstraints = NO ;
195
195
[NSLayoutConstraint activateConstraints: @[
196
196
[instructionsStackView.centerXAnchor constraintEqualToAnchor: view.centerXAnchor],
197
197
[instructionsStackView.bottomAnchor constraintEqualToAnchor: view.bottomAnchor constant: -38 .f],
0 commit comments