[ios] Fixed log in button.

This commit is contained in:
VladiMihaylenko 2016-02-04 15:17:39 +03:00 committed by Sergey Yershov
parent c388e69f35
commit 53144f0c01
2 changed files with 6 additions and 11 deletions

View file

@ -54,13 +54,6 @@ using namespace osm;
self.forgotButton.enabled = Platform::IsConnected();
}
- (void)setLoginButtonEnabled:(BOOL)enabled
{
self.loginButton.enabled = enabled;
CALayer * layer = self.loginButton.layer;
layer.borderColor = (enabled ? [UIColor buttonEnabledBlueText] : [UIColor clearColor]).CGColor;
}
#pragma mark - UITextFieldDelegate
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
@ -184,7 +177,7 @@ using namespace osm;
- (void)setIsCorrect:(MWMFieldCorrect)isCorrect
{
_isCorrect = isCorrect;
[self setLoginButtonEnabled:isCorrect == MWMFieldCorrectAll];
self.loginButton.enabled = isCorrect == MWMFieldCorrectAll;
}
@end

View file

@ -1550,17 +1550,19 @@
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<state key="normal" title="Log In"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="layer.borderUIColor">
<color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whiteColor"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="clearColor"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueHighlighted"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="login" destination="4R7-Vk-fQr" eventType="touchUpInside" id="IIp-Wz-gj1"/>