Commit b055ce28 by ludi

修复一些bug

parent ca60edda
...@@ -244,7 +244,6 @@ ...@@ -244,7 +244,6 @@
case FUSButtonStyleBlueBorder: case FUSButtonStyleBlueBorder:
{ {
[self cleanStyle]; [self cleanStyle];
[self setTitleColor:[UIColor fus_diamondBlue] forState:UIControlStateNormal];
self.layer.cornerRadius = self.height / 2.0f; self.layer.cornerRadius = self.height / 2.0f;
self.layer.masksToBounds = YES; self.layer.masksToBounds = YES;
self.layer.borderColor = UIColor.fus_diamondBlue.CGColor; self.layer.borderColor = UIColor.fus_diamondBlue.CGColor;
...@@ -252,6 +251,7 @@ ...@@ -252,6 +251,7 @@
self.backgroundColor = [UIColor clearColor]; self.backgroundColor = [UIColor clearColor];
[self setTitleColor:[UIColor fus_diamondBlue] forState:(UIControlStateNormal)]; [self setTitleColor:[UIColor fus_diamondBlue] forState:(UIControlStateNormal)];
[self setTitleColor:[UIColor fus_diamondBlue] forState:(UIControlStateDisabled)];
} }
break; break;
default: default:
...@@ -277,6 +277,8 @@ ...@@ -277,6 +277,8 @@
self.layer.borderWidth = 0; self.layer.borderWidth = 0;
self.layer.borderColor = [[UIColor clearColor] CGColor]; self.layer.borderColor = [[UIColor clearColor] CGColor];
[self setTitleColor:[UIColor fus_textColorRich] forState:(UIControlStateNormal)];
[self.gradientView.layer removeFromSuperlayer]; [self.gradientView.layer removeFromSuperlayer];
self.gradientView = nil; self.gradientView = nil;
[CATransaction commit]; [CATransaction commit];
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "twitter@2x.png", "filename" : "newsfeed_share_twitter_preesed@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "twitter-preesed@2x.png", "filename" : "newsfeed_share_twitter_preesed@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#import "FUSLoginCacheOperate.h" #import "FUSLoginCacheOperate.h"
#import "FUSAreaSelectViewController.h" #import "FUSAreaSelectViewController.h"
#import "FUSCountryHelper.h" #import "FUSCountryHelper.h"
#import <SJAttributesFactory/SJAttributesFactory.h>
@interface FUSPhoneAuthViewController () <UITextFieldDelegate> @interface FUSPhoneAuthViewController () <UITextFieldDelegate>
...@@ -40,6 +41,8 @@ ...@@ -40,6 +41,8 @@
获取验证码按钮 获取验证码按钮
*/ */
@property (weak, nonatomic) IBOutlet UIButton *verifyCodeBtn; @property (weak, nonatomic) IBOutlet UIButton *verifyCodeBtn;
/// 获取验证码按钮宽度
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *verifyCodeBtnWidthConstraint;
/** /**
确认按钮 确认按钮
...@@ -122,20 +125,40 @@ ...@@ -122,20 +125,40 @@
_bindingPhoneBgView2.layer.cornerRadius = _bindingPhoneBgView2.height / 2; _bindingPhoneBgView2.layer.cornerRadius = _bindingPhoneBgView2.height / 2;
_bindingPhoneBgView3.layer.cornerRadius = _bindingPhoneBgView3.height / 2; _bindingPhoneBgView3.layer.cornerRadius = _bindingPhoneBgView3.height / 2;
_bindingPhoneBgView4.layer.cornerRadius = _bindingPhoneBgView4.height / 2; _bindingPhoneBgView4.layer.cornerRadius = _bindingPhoneBgView4.height / 2;
_bindingPhoneBgView1.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
_bindingPhoneBgView2.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
_bindingPhoneBgView3.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
_bindingPhoneBgView4.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
_countryNameLabel.textColor = [UIColor fus_textColorRich];
_countryTopLocalLabel.textColor = [UIColor fus_textColorRich];
_phoneLeftLabel.textColor = [UIColor fus_textColorRich];
_verifyCodeBtn.layer.cornerRadius = _verifyCodeBtn.height / 2.0; _verifyCodeBtn.layer.cornerRadius = _verifyCodeBtn.height / 2.0;
_verifyCodeBtn.layer.borderWidth = 1; _verifyCodeBtn.layer.borderWidth = 1;
[_verifyCodeBtn setTitle:[NSString fus_localString:@"发送验证码"] forState:UIControlStateNormal]; [_verifyCodeBtn setTitle:[NSString fus_localString:@"发送验证码"] forState:UIControlStateNormal];
[self setVerifyCodeBtnEnable:NO]; [self setVerifyCodeBtnEnable:NO];
[_verifyCodeBtn sizeToFit];
self.verifyCodeBtnWidthConstraint.constant = _verifyCodeBtn.width + 16;
_confirmBtn.style = FUSButtonStyleBlue; _confirmBtn.style = FUSButtonStyleBlue;
_confirmBtn.layer.cornerRadius = _confirmBtn.height/2.0; _confirmBtn.layer.cornerRadius = _confirmBtn.height/2.0;
[_confirmBtn setTitle:[NSString fus_localString:@"确定"] forState:UIControlStateNormal]; [_confirmBtn setTitle:[NSString fus_localString:@"确定"] forState:UIControlStateNormal];
_confirmBtn.enabled = NO; _confirmBtn.enabled = NO;
_phoneNumberTextField.placeholder = [NSString fus_localString:@"请输入手机号"]; _phoneNumberTextField.attributedPlaceholder = [NSAttributedString sj_UIKitText:^(id<SJUIKitTextMakerProtocol> _Nonnull make) {
_verifyCodeTextField.placeholder = [NSString fus_localString:@"请输入验证码"]; make.append([NSString fus_localString:@"请输入手机号"]).textColor([UIColor fus_textColorLight2]);
_passwordTextField.placeholder = [NSString fus_localString:@"请设置6~16位新密码"]; }];
_phoneNumberTextField.textColor = [UIColor fus_textColorRich];
_verifyCodeTextField.attributedPlaceholder = [NSAttributedString sj_UIKitText:^(id<SJUIKitTextMakerProtocol> _Nonnull make) {
make.append([NSString fus_localString:@"请输入验证码"]).textColor([UIColor fus_textColorLight2]);
}];
_verifyCodeTextField.textColor = [UIColor fus_textColorRich];
_passwordTextField.attributedPlaceholder = [NSAttributedString sj_UIKitText:^(id<SJUIKitTextMakerProtocol> _Nonnull make) {
make.append([NSString fus_localString:@"请设置6~16位新密码"]).textColor([UIColor fus_textColorLight2]);
}];
_passwordTextField.textColor = [UIColor fus_textColorRich];
_countryTopLocalLabel.text = [NSString fus_localString:@"国家/地区"]; _countryTopLocalLabel.text = [NSString fus_localString:@"国家/地区"];
_phoneNumberTextField.textMaxLength = 13; _phoneNumberTextField.textMaxLength = 13;
...@@ -284,11 +307,15 @@ ...@@ -284,11 +307,15 @@
_verifyCodeTimer = nil; _verifyCodeTimer = nil;
[self setVerifyCodeBtnEnable:YES]; [self setVerifyCodeBtnEnable:YES];
[_verifyCodeBtn setTitle:[NSString fus_localString:@"发送验证码"] forState:UIControlStateNormal]; [_verifyCodeBtn setTitle:[NSString fus_localString:@"发送验证码"] forState:UIControlStateNormal];
[_verifyCodeBtn sizeToFit];
self.verifyCodeBtnWidthConstraint.constant = _verifyCodeBtn.width + 16;
return; return;
} }
[self setVerifyCodeBtnEnable:NO]; [self setVerifyCodeBtnEnable:NO];
[_verifyCodeBtn setTitle:[NSString stringWithFormat:@"%lds",_countDown] forState:UIControlStateDisabled]; [_verifyCodeBtn setTitle:[NSString stringWithFormat:@"%lds",_countDown] forState:UIControlStateDisabled];
[_verifyCodeBtn sizeToFit];
self.verifyCodeBtnWidthConstraint.constant = _verifyCodeBtn.width + 16;
_countDown -= 1; _countDown -= 1;
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait"> <device id="retina4_7" orientation="portrait" appearance="light"/>
<adaptation id="fullscreen"/>
</device>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -25,6 +23,7 @@ ...@@ -25,6 +23,7 @@
<outlet property="pwdSecurityBtn" destination="oDB-MW-JpB" id="8q7-qY-V45"/> <outlet property="pwdSecurityBtn" destination="oDB-MW-JpB" id="8q7-qY-V45"/>
<outlet property="rightArrowImageView" destination="Rj5-db-gML" id="WFa-hE-DGP"/> <outlet property="rightArrowImageView" destination="Rj5-db-gML" id="WFa-hE-DGP"/>
<outlet property="verifyCodeBtn" destination="YBa-Ir-FKd" id="AEp-Md-dOf"/> <outlet property="verifyCodeBtn" destination="YBa-Ir-FKd" id="AEp-Md-dOf"/>
<outlet property="verifyCodeBtnWidthConstraint" destination="hQo-Me-vzA" id="vx5-Fp-c83"/>
<outlet property="verifyCodeTextField" destination="iaU-d5-a1C" id="zAN-p5-CTw"/> <outlet property="verifyCodeTextField" destination="iaU-d5-a1C" id="zAN-p5-CTw"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
...@@ -38,7 +37,7 @@ ...@@ -38,7 +37,7 @@
<rect key="frame" x="32" y="32" width="311" height="45"/> <rect key="frame" x="32" y="32" width="311" height="45"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="国家/地区" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="em9-y2-dUI"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="国家/地区" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="em9-y2-dUI">
<rect key="frame" x="16" y="0.0" width="66" height="45"/> <rect key="frame" x="16" y="0.0" width="69.5" height="45"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -50,8 +49,8 @@ ...@@ -50,8 +49,8 @@
<constraint firstAttribute="width" constant="20" id="EeH-og-UeF"/> <constraint firstAttribute="width" constant="20" id="EeH-og-UeF"/>
</constraints> </constraints>
</imageView> </imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KXx-uS-DFC"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KXx-uS-DFC">
<rect key="frame" x="82" y="0.0" width="229" height="45"/> <rect key="frame" x="85.5" y="0.0" width="225.5" height="45"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<inset key="titleEdgeInsets" minX="0.0" minY="0.0" maxX="35" maxY="0.0"/> <inset key="titleEdgeInsets" minX="0.0" minY="0.0" maxX="35" maxY="0.0"/>
<state key="normal"> <state key="normal">
...@@ -62,7 +61,7 @@ ...@@ -62,7 +61,7 @@
</connections> </connections>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZsU-oZ-dQ7"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZsU-oZ-dQ7">
<rect key="frame" x="82" y="0.0" width="195" height="45"/> <rect key="frame" x="85.5" y="0.0" width="191.5" height="45"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
...@@ -89,12 +88,12 @@ ...@@ -89,12 +88,12 @@
<rect key="frame" x="32" y="85" width="311" height="45"/> <rect key="frame" x="32" y="85" width="311" height="45"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+86" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Csh-Bf-T81"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+86" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Csh-Bf-T81">
<rect key="frame" x="16" y="0.0" width="28.5" height="45"/> <rect key="frame" x="16" y="0.0" width="28" height="45"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入手机号" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="eGA-7P-E22" userLabel="手机号" customClass="FUSTextField"> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入手机号" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="eGA-7P-E22" userLabel="手机号" customClass="FUSTextField">
<rect key="frame" x="52.5" y="0.0" width="196.5" height="45"/> <rect key="frame" x="52" y="0.0" width="197" height="45"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="next"/> <textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="next"/>
<connections> <connections>
...@@ -144,7 +143,7 @@ ...@@ -144,7 +143,7 @@
</constraints> </constraints>
</imageView> </imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入验证码" minimumFontSize="16" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="iaU-d5-a1C" customClass="FUSTextField"> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入验证码" minimumFontSize="16" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="iaU-d5-a1C" customClass="FUSTextField">
<rect key="frame" x="52.5" y="0.0" width="258.5" height="45"/> <rect key="frame" x="52" y="0.0" width="259" height="45"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="next"/> <textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="next"/>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
...@@ -176,7 +175,7 @@ ...@@ -176,7 +175,7 @@
</constraints> </constraints>
</imageView> </imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请设置6~16位新密码" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="M69-QI-p6n" customClass="FUSTextField"> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请设置6~16位新密码" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="M69-QI-p6n" customClass="FUSTextField">
<rect key="frame" x="52.5" y="0.0" width="216.5" height="45"/> <rect key="frame" x="52" y="0.0" width="217" height="45"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<textInputTraits key="textInputTraits" returnKeyType="next" secureTextEntry="YES"/> <textInputTraits key="textInputTraits" returnKeyType="next" secureTextEntry="YES"/>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
- (void)initial { - (void)initial {
self.unreadBtn = [UIButton buttonWithType:UIButtonTypeCustom]; self.unreadBtn = [UIButton buttonWithType:UIButtonTypeCustom];
self.unreadBtn.frame = CGRectMake(0, 0, 115, 35); self.unreadBtn.frame = CGRectMake(0, 0, 115, 35);
[self.unreadBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [self.unreadBtn setTitleColor:[UIColor fus_textColorMedium] forState:UIControlStateNormal];
self.unreadBtn.titleLabel.font = [UIFont fus_themeFont:13]; self.unreadBtn.titleLabel.font = [UIFont fus_themeFont:13];
[self.unreadBtn setBackgroundImage:[UIImage imageNamed:@"news_feed_unread_btn_bg"] forState:UIControlStateNormal]; [self.unreadBtn setBackgroundImage:[UIImage imageNamed:@"news_feed_unread_btn_bg"] forState:UIControlStateNormal];
self.unreadBtn.center = CGPointMake(self.width / 2, self.height / 2); self.unreadBtn.center = CGPointMake(self.width / 2, self.height / 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment