add files
This commit is contained in:
parent
3efde8e0ea
commit
e64e011d8f
|
|
@ -1338,7 +1338,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = GIGA/GIGA.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = YYP376WR4X;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)//GIGA/GIGA.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
|
|
@ -1355,8 +1355,8 @@
|
|||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gigamask.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "f3b84b1a-7ac9-46d1-bd63-b997256cf85b";
|
||||
PROVISIONING_PROFILE_SPECIFIER = jijiaDevelopmentProfile;
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
|
|
@ -1368,8 +1368,8 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = GIGA/GIGA.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = YYP376WR4X;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)//GIGA/GIGA.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "btn_meaasag@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "btn_meaasag@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "btn_right.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 410 B |
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "btn_turndown.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 386 B |
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_note@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_note@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 912 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -56,9 +56,9 @@ static char overlayKey;
|
|||
|
||||
-(void)resetBackgroundImage{
|
||||
|
||||
//[self setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
|
||||
//[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
|
||||
|
||||
[self setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault];
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
|
||||
self.interactivePopGestureRecognizer.delegate = (id)self;
|
||||
self.view.backgroundColor = UIColor.whiteColor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,15 +9,11 @@
|
|||
#import "GiGaBaseViewController.h"
|
||||
#import "UIView+Toast.h"
|
||||
#import "GiGaNavTitileView.h"
|
||||
#import "UINavigationBar+Custom.h"
|
||||
|
||||
@interface GiGaBaseViewController ()
|
||||
{
|
||||
// UIColor *navigationBarBGColor; //导航栏背景色
|
||||
// UIColor *navigationBarTitleColor; //导航栏标题字色
|
||||
// SEL _rightBtnAction;
|
||||
// SEL _refreshHeaderSelector;
|
||||
// SEL _refreshFooterSelector;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -27,8 +23,18 @@
|
|||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self.view addSubview:_tableView];
|
||||
//[self testNetworkStatus];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)viewWillDisappear:(BOOL)animated{
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController.navigationBar cnSetBackgroundColor:GIGAUIColorFromRGB_A(0xD8D8D8, 0.2)];
|
||||
}
|
||||
|
||||
-(void)addNavTitile:(NSString *)title{
|
||||
|
|
@ -93,7 +99,6 @@
|
|||
|
||||
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
|
||||
}
|
||||
|
||||
return _tableView;
|
||||
}
|
||||
- (void)didReceiveMemoryWarning {
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
{
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)];
|
||||
label.textColor = [UIColor redColor];
|
||||
label.textColor = GIGAUIColorFromRGBA(0x777777);
|
||||
label.text = str;
|
||||
label.font = [UIFont boldSystemFontOfSize:18.0f];
|
||||
label.font = [UIFont fontWithName:@"PingFangSC-Medium" size:18.f];
|
||||
label.textAlignment = NSTextAlignmentCenter;
|
||||
[self addSubview:label];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ NSString *const kGiGaToken = @"GiGatoken";
|
|||
|
||||
+(BOOL)isShowedAppGaurd{
|
||||
BOOL showedGaurd = [UD_STADARDUD boolForKey:kShowAppGuard];
|
||||
[UD_STADARDUD synchronize];
|
||||
return showedGaurd;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GiGaRegistViewController : UIViewController
|
||||
#import "GiGaBaseViewController.h"
|
||||
@interface GiGaRegistViewController : GiGaBaseViewController
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -33,13 +33,15 @@
|
|||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.title = @"注册";
|
||||
_time = 60;
|
||||
//self.title = @"注册";
|
||||
[self addNavTitile:@"注册"];
|
||||
|
||||
_time = 60;
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
[self confirmUI];
|
||||
[self.sendCodeBtn addTarget:self action:@selector(sendCodeBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.registBtn addTarget:self action:@selector(registBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.checkBtn addTarget:self action:@selector(checkBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
}
|
||||
-(void)dealloc{
|
||||
|
|
@ -50,6 +52,7 @@
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
-(void)sendCodeBtnAction:(UIButton *)btn{
|
||||
|
||||
if (self.phoneNumberTextField.text == nil) {
|
||||
|
|
@ -74,7 +77,7 @@
|
|||
|
||||
if (self->_time==0) {
|
||||
[self.sendCodeBtn setTitle:@"发送短信" forState:UIControlStateNormal];
|
||||
[btn setBackgroundColor:GIGAUIColorFromRGBA(0x28b9ff)];
|
||||
|
||||
self->_time =60;
|
||||
btn.userInteractionEnabled = YES;
|
||||
}
|
||||
|
|
@ -106,6 +109,7 @@
|
|||
-(void)confirmUI{
|
||||
|
||||
self.useragreementLabel.highlightedTextColor = [UIColor lightGrayColor];
|
||||
self.useragreementLabel.textColor = GIGAUIColorFromRGBA(0x919191);
|
||||
self.useragreementLabel.delegate = self;
|
||||
self.useragreementLabel.enabledTextCheckingTypes= NSTextCheckingTypePhoneNumber|NSTextCheckingTypeAddress|NSTextCheckingTypeLink;
|
||||
self.useragreementLabel.linkAttributes = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:(NSString *)kCTUnderlineStyleAttributeName];
|
||||
|
|
@ -114,13 +118,13 @@
|
|||
NSString *text = @"已阅读并同意《用户服务协议》";
|
||||
[self.useragreementLabel setText:text afterInheritingLabelAttributesAndConfiguringWithBlock:^NSMutableAttributedString *(NSMutableAttributedString *mutableAttributedString) {
|
||||
NSRange fontRange = [[mutableAttributedString string] rangeOfString:@"用户服务协议" options:NSCaseInsensitiveSearch];
|
||||
UIFont* sysFont = [UIFont systemFontOfSize:15];
|
||||
UIFont* sysFont = [UIFont fontWithName:@"PingFangSC-Semibold" size:10.f];
|
||||
CTFontRef font = CTFontCreateWithName((__bridge CFStringRef)sysFont.fontName, sysFont.pointSize, NULL);
|
||||
if (font) {
|
||||
|
||||
[mutableAttributedString addAttribute:(NSString *)kCTFontAttributeName value:(__bridge id)font range:fontRange];
|
||||
|
||||
[mutableAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(__bridge id)[[UIColor greenColor] CGColor] range:fontRange];
|
||||
[mutableAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(__bridge id)[[UIColor colorWithRed:0/255.0 green:222/255.0 blue:189/255.0 alpha:1/1.0] CGColor] range:fontRange];
|
||||
}
|
||||
return mutableAttributedString;
|
||||
|
||||
|
|
@ -131,6 +135,9 @@
|
|||
@"SourceName":@"useragreement"
|
||||
} withRange:fontRange];
|
||||
|
||||
self.registBtn.layer.masksToBounds = YES;
|
||||
self.registBtn.layer.cornerRadius = self.registBtn.frame.size.height / 2;
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - TTTAttributedLabelDelegate
|
||||
|
|
@ -188,10 +195,8 @@
|
|||
btn.userInteractionEnabled = YES;
|
||||
GILog(@"注册->%@",result.message);
|
||||
if (result.code == 0) {
|
||||
|
||||
NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text);
|
||||
NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text);
|
||||
|
||||
|
||||
}else if (result.code == GiGAErrorCode_USER_EXIST){
|
||||
GIGA_ShowToast(@"用户已存在");
|
||||
NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text);
|
||||
|
|
@ -203,6 +208,21 @@
|
|||
|
||||
}
|
||||
|
||||
-(void)checkBtnAction:(UIButton *)btn{
|
||||
btn.selected = !btn.selected;
|
||||
if (btn.selected) {
|
||||
[btn setImage:[UIImage imageNamed:@"btn_turndown"] forState:UIControlStateSelected];
|
||||
|
||||
[self.registBtn setBackgroundColor:[UIColor lightGrayColor]];
|
||||
self.registBtn.userInteractionEnabled = NO;
|
||||
|
||||
}else{
|
||||
[btn setImage:[UIImage imageNamed:@"btn_right"] forState:UIControlStateNormal];
|
||||
[self.registBtn setBackgroundColor:GIGARGB(0, 222, 189, 1)];
|
||||
self.registBtn.userInteractionEnabled = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
|
|
|
|||
|
|
@ -27,129 +27,136 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SEO-0F-Irb">
|
||||
<rect key="frame" x="145" y="55" width="84" height="84"/>
|
||||
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="SEO-0F-Irb">
|
||||
<rect key="frame" x="131" y="107" width="114" height="114"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="84" id="Ac0-Im-dQ0"/>
|
||||
<constraint firstAttribute="width" secondItem="SEO-0F-Irb" secondAttribute="height" multiplier="1:1" id="o6U-yH-mAL"/>
|
||||
<constraint firstAttribute="width" secondItem="SEO-0F-Irb" secondAttribute="height" multiplier="1:1" id="DXE-XM-Ewy"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder=" 请输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="uJG-KF-a91">
|
||||
<rect key="frame" x="36" y="163" width="303" height="40"/>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="uJG-KF-a91">
|
||||
<rect key="frame" x="66" y="250" width="243" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="HLZ-Al-gsF"/>
|
||||
<constraint firstAttribute="height" constant="48" id="EoB-aP-I0k"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.77254901960784317" green="0.77254901960784317" blue="0.77254901960784317" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
</textField>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="短信验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dR7-iu-Eup">
|
||||
<rect key="frame" x="36" y="221" width="303" height="40"/>
|
||||
<rect key="frame" x="66" y="306" width="131" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="kFj-lZ-f1b"/>
|
||||
<constraint firstAttribute="height" constant="48" id="5Og-5V-Pzs"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.7725490196" green="0.7725490196" blue="0.7725490196" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
</textField>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="设置登录密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="UUC-74-fsa">
|
||||
<rect key="frame" x="36" y="278" width="303" height="40"/>
|
||||
<rect key="frame" x="65" y="362" width="244" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="ZXN-7M-Ya1"/>
|
||||
<constraint firstAttribute="height" constant="48" id="PcQ-aA-iwb"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.77254901960784317" green="0.77254901960784317" blue="0.77254901960784317" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ubQ-Za-dV7">
|
||||
<rect key="frame" x="36" y="211" width="303" height="1"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<rect key="frame" x="65" y="299" width="245" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="ZnO-2U-V61"/>
|
||||
<constraint firstAttribute="height" constant="1" id="8Ou-gP-rKg"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Trq-bz-kQT">
|
||||
<rect key="frame" x="36" y="269" width="303" height="1"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<rect key="frame" x="65" y="355" width="245" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="VhP-k3-4oj"/>
|
||||
<constraint firstAttribute="height" constant="1" id="IDq-fJ-8qH"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pb5-1e-TXp">
|
||||
<rect key="frame" x="36" y="326" width="303" height="1"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<rect key="frame" x="65" y="411" width="245" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="p8o-Oo-C9M"/>
|
||||
<constraint firstAttribute="height" constant="1" id="kWY-vL-sbU"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qAH-Fa-AmF">
|
||||
<rect key="frame" x="242" y="217" width="87" height="48"/>
|
||||
<rect key="frame" x="214" y="306" width="88" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="87" id="HC3-fN-xKP"/>
|
||||
<constraint firstAttribute="height" constant="48" id="iQo-1Y-aPA"/>
|
||||
<constraint firstAttribute="height" constant="48" id="dmG-UE-Ob4"/>
|
||||
<constraint firstAttribute="width" constant="88" id="oNZ-6H-eha"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<state key="normal" title="发送验证码">
|
||||
<color key="titleColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<inset key="titleEdgeInsets" minX="-77" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<inset key="imageEdgeInsets" minX="5" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" title="发送验证码" image="btn_meaasag">
|
||||
<color key="titleColor" red="0.60784313725490191" green="0.60784313725490191" blue="0.60784313725490191" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b06-w9-r2g">
|
||||
<rect key="frame" x="36" y="353" width="33" height="27"/>
|
||||
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<rect key="frame" x="94" y="560" width="39" height="37"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="27" id="TwO-WB-jNy"/>
|
||||
<constraint firstAttribute="width" constant="33" id="n2h-mQ-iLM"/>
|
||||
<constraint firstAttribute="height" constant="37" id="BVg-id-9GB"/>
|
||||
<constraint firstAttribute="width" constant="39" id="gPN-W1-lt7"/>
|
||||
</constraints>
|
||||
<state key="normal" image="btn_right"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hZA-nj-Wmu">
|
||||
<rect key="frame" x="36" y="414" width="303" height="48"/>
|
||||
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<rect key="frame" x="87" y="457" width="201" height="41"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.87058823529411766" blue="0.74117647058823533" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="1ii-ua-NM2"/>
|
||||
<constraint firstAttribute="height" constant="41" id="4e7-y8-S2C"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title="注 册"/>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vxb-TL-wDd" customClass="GiGaAttributedLabel">
|
||||
<rect key="frame" x="77" y="356" width="42" height="21"/>
|
||||
<fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已阅读并同意《用户服务协议》" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vxb-TL-wDd" customClass="GiGaAttributedLabel">
|
||||
<rect key="frame" x="129" y="570.5" width="140" height="15"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="10"/>
|
||||
<color key="textColor" red="0.56862745098039214" green="0.56862745098039214" blue="0.56862745098039214" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="highlightedColor" red="0.56862745100000001" green="0.56862745100000001" blue="0.56862745100000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="uJG-KF-a91" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="3lK-sI-SIL"/>
|
||||
<constraint firstItem="qAH-Fa-AmF" firstAttribute="leading" secondItem="dR7-iu-Eup" secondAttribute="trailing" constant="-97" id="68S-uL-NWf"/>
|
||||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="8oy-SI-wjc"/>
|
||||
<constraint firstItem="uJG-KF-a91" firstAttribute="top" secondItem="SEO-0F-Irb" secondAttribute="bottom" constant="24" id="9KB-zh-0Iv"/>
|
||||
<constraint firstItem="UUC-74-fsa" firstAttribute="width" secondItem="uJG-KF-a91" secondAttribute="width" id="AxW-2N-oD9"/>
|
||||
<constraint firstItem="b06-w9-r2g" firstAttribute="leading" secondItem="Pb5-1e-TXp" secondAttribute="leading" id="BTF-Y0-iHe"/>
|
||||
<constraint firstItem="Vxb-TL-wDd" firstAttribute="leading" secondItem="b06-w9-r2g" secondAttribute="trailing" constant="8" id="Dc3-Gz-cl5"/>
|
||||
<constraint firstItem="Pb5-1e-TXp" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="ETi-1w-mRx"/>
|
||||
<constraint firstItem="qAH-Fa-AmF" firstAttribute="centerY" secondItem="dR7-iu-Eup" secondAttribute="centerY" id="G6I-E3-lox"/>
|
||||
<constraint firstItem="Trq-bz-kQT" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="GsV-nH-ZTs"/>
|
||||
<constraint firstItem="SEO-0F-Irb" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="HKT-sW-HzQ"/>
|
||||
<constraint firstItem="Vxb-TL-wDd" firstAttribute="centerY" secondItem="b06-w9-r2g" secondAttribute="centerY" id="M1g-x2-bC1"/>
|
||||
<constraint firstItem="ubQ-Za-dV7" firstAttribute="top" secondItem="uJG-KF-a91" secondAttribute="bottom" constant="8" id="QhR-31-HPa"/>
|
||||
<constraint firstItem="Pb5-1e-TXp" firstAttribute="width" secondItem="UUC-74-fsa" secondAttribute="width" id="Sd7-d5-Uht"/>
|
||||
<constraint firstItem="Trq-bz-kQT" firstAttribute="top" secondItem="dR7-iu-Eup" secondAttribute="bottom" constant="8" id="WSq-Ss-0Ac"/>
|
||||
<constraint firstItem="SEO-0F-Irb" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="55" id="Xk1-QJ-vEV"/>
|
||||
<constraint firstItem="uJG-KF-a91" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="36" id="cUx-ne-9fl"/>
|
||||
<constraint firstItem="dR7-iu-Eup" firstAttribute="top" secondItem="ubQ-Za-dV7" secondAttribute="bottom" constant="9" id="cnf-kX-9T5"/>
|
||||
<constraint firstItem="dR7-iu-Eup" firstAttribute="width" secondItem="uJG-KF-a91" secondAttribute="width" id="d0L-Yy-an6"/>
|
||||
<constraint firstItem="dR7-iu-Eup" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="fDj-om-PCx"/>
|
||||
<constraint firstItem="ubQ-Za-dV7" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="fcn-EO-FSA"/>
|
||||
<constraint firstItem="b06-w9-r2g" firstAttribute="top" secondItem="Pb5-1e-TXp" secondAttribute="bottom" constant="26" id="kHK-na-vql"/>
|
||||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="leading" secondItem="b06-w9-r2g" secondAttribute="leading" id="nSQ-58-vgR"/>
|
||||
<constraint firstItem="UUC-74-fsa" firstAttribute="top" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="8" id="pft-bZ-H5z"/>
|
||||
<constraint firstItem="UUC-74-fsa" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="pth-LZ-Cdm"/>
|
||||
<constraint firstItem="ubQ-Za-dV7" firstAttribute="width" secondItem="uJG-KF-a91" secondAttribute="width" id="sAe-4S-EEP"/>
|
||||
<constraint firstItem="Pb5-1e-TXp" firstAttribute="top" secondItem="UUC-74-fsa" secondAttribute="bottom" constant="8" id="trq-E6-Qag"/>
|
||||
<constraint firstItem="Trq-bz-kQT" firstAttribute="width" secondItem="dR7-iu-Eup" secondAttribute="width" id="xA0-yc-8lb"/>
|
||||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="top" secondItem="b06-w9-r2g" secondAttribute="bottom" constant="34" id="xPR-Yh-hFk"/>
|
||||
<constraint firstItem="ubQ-Za-dV7" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="2JV-ih-aWQ"/>
|
||||
<constraint firstItem="Vxb-TL-wDd" firstAttribute="leading" secondItem="b06-w9-r2g" secondAttribute="trailing" constant="-4" id="3xm-2N-nGj"/>
|
||||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="top" secondItem="UUC-74-fsa" secondAttribute="bottom" constant="47" id="4Ny-tr-SQK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Pb5-1e-TXp" secondAttribute="trailing" constant="65" id="4r6-39-cqm"/>
|
||||
<constraint firstItem="dR7-iu-Eup" firstAttribute="top" secondItem="ubQ-Za-dV7" secondAttribute="bottom" constant="6" id="5AI-lo-BIZ"/>
|
||||
<constraint firstItem="Trq-bz-kQT" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="5wT-D8-1gY"/>
|
||||
<constraint firstItem="SEO-0F-Irb" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="7P5-hD-rSJ"/>
|
||||
<constraint firstItem="uJG-KF-a91" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="7qC-LL-nvo"/>
|
||||
<constraint firstItem="UUC-74-fsa" firstAttribute="top" secondItem="Trq-bz-kQT" secondAttribute="bottom" constant="6" id="8hA-N7-fkB"/>
|
||||
<constraint firstItem="UUC-74-fsa" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="Bja-9z-dcO"/>
|
||||
<constraint firstItem="SEO-0F-Irb" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="131" id="Cvk-mn-yKv"/>
|
||||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="87" id="DqU-NP-4f5"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Trq-bz-kQT" secondAttribute="trailing" constant="65" id="GUO-SG-oNK"/>
|
||||
<constraint firstItem="qAH-Fa-AmF" firstAttribute="top" secondItem="uJG-KF-a91" secondAttribute="bottom" constant="8" id="HbD-BO-bbP"/>
|
||||
<constraint firstItem="ubQ-Za-dV7" firstAttribute="top" secondItem="uJG-KF-a91" secondAttribute="bottom" constant="1" id="LDG-vR-kTg"/>
|
||||
<constraint firstItem="Pb5-1e-TXp" firstAttribute="top" secondItem="UUC-74-fsa" secondAttribute="bottom" constant="1" id="MiP-4J-kau"/>
|
||||
<constraint firstItem="hZA-nj-Wmu" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="bjY-fC-f0d"/>
|
||||
<constraint firstItem="Trq-bz-kQT" firstAttribute="top" secondItem="dR7-iu-Eup" secondAttribute="bottom" constant="1" id="bqX-bp-Y1W"/>
|
||||
<constraint firstItem="uJG-KF-a91" firstAttribute="top" secondItem="SEO-0F-Irb" secondAttribute="bottom" constant="29" id="dgm-Ml-Hfb"/>
|
||||
<constraint firstItem="qAH-Fa-AmF" firstAttribute="leading" secondItem="dR7-iu-Eup" secondAttribute="trailing" constant="17" id="hPp-7L-ChH"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ubQ-Za-dV7" secondAttribute="trailing" constant="65" id="iKP-5V-WP4"/>
|
||||
<constraint firstItem="Pb5-1e-TXp" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="k2n-Mo-tk9"/>
|
||||
<constraint firstItem="dR7-iu-Eup" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="66" id="kEf-x4-abN"/>
|
||||
<constraint firstItem="Vxb-TL-wDd" firstAttribute="centerY" secondItem="b06-w9-r2g" secondAttribute="centerY" id="mR2-xW-ifS"/>
|
||||
<constraint firstItem="b06-w9-r2g" firstAttribute="top" secondItem="hZA-nj-Wmu" secondAttribute="bottom" constant="62" id="pur-Ys-i5n"/>
|
||||
<constraint firstItem="b06-w9-r2g" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="94" id="pxn-ec-ZyW"/>
|
||||
<constraint firstItem="UUC-74-fsa" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="q9F-nT-aJr"/>
|
||||
<constraint firstItem="SEO-0F-Irb" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="107" id="r8t-sA-k7V"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qAH-Fa-AmF" secondAttribute="trailing" constant="73" id="wRx-IO-sxn"/>
|
||||
<constraint firstItem="uJG-KF-a91" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="66" id="zs7-sD-XZI"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="33.5" y="53.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="btn_meaasag" width="76" height="22"/>
|
||||
<image name="btn_right" width="14" height="14"/>
|
||||
<image name="img_circle_avatar" width="114" height="114"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@
|
|||
NC_ADD_TARGET_NAME_OBJECT(self, @selector(WeiXinLongIn:), kWeiXinAuthrization_Success, nil)
|
||||
NC_ADD_TARGET_NAME_OBJECT(self, @selector(userRegistSuccsessNoti:), kUserRegistSucccess, nil)
|
||||
|
||||
if (![WXApi isWXAppInstalled]) {
|
||||
self.weiXinLoginBtn.hidden = YES;
|
||||
}
|
||||
// if (![WXApi isWXAppInstalled]) {
|
||||
// self.weiXinLoginBtn.hidden = YES;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
-(void)textFieldUI{
|
||||
|
||||
//self.acountTextField.attributedPlaceholder = @"";
|
||||
|
||||
UIView *acountView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||
UIImageView *acountViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,9, 12, 22)];
|
||||
acountViewIcon.image = [UIImage imageNamed:@"ic_number"];
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
// NSAttributedString *passholderText = [[NSAttributedString alloc] initWithString:@"密码" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14],NSForegroundColorAttributeName:[UIColor redColor]}];
|
||||
// self.passwordTextField.attributedPlaceholder = passholderText;
|
||||
UIView *passView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||
UIImageView *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 9, 12, 22)];
|
||||
UIImageView *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,8, 12, 22)];
|
||||
passViewIcon.image = [UIImage imageNamed:@"icon_key"];
|
||||
[passView addSubview:passViewIcon];
|
||||
self.passwordTextField.leftView = passView;
|
||||
|
|
@ -91,8 +91,18 @@
|
|||
self.loginBtn.layer.masksToBounds = YES;
|
||||
self.loginBtn.layer.cornerRadius = self.loginBtn.frame.size.height / 2;
|
||||
|
||||
self.weiXinLoginBtn.layer.masksToBounds = YES;
|
||||
self.weiXinLoginBtn.layer.cornerRadius = self.weiXinLoginBtn.frame.size.height / 2;
|
||||
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] init];
|
||||
|
||||
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
|
||||
attch.image = [UIImage imageNamed:@"ic_wechat"];
|
||||
attch.bounds = CGRectMake(0,-4, 12.9, 12.5);
|
||||
NSAttributedString *imastr=[NSAttributedString attributedStringWithAttachment:attch];
|
||||
[attri appendAttributedString:imastr];
|
||||
|
||||
NSAttributedString *titleStr = [[NSAttributedString alloc] initWithString:@" 微信账号登录" attributes:@{NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Semibold" size:10],NSForegroundColorAttributeName:[UIColor colorWithRed:187/255.0 green:187/255.0 blue:187/255.0 alpha:1/1.0]}];
|
||||
|
||||
[attri appendAttributedString:titleStr];
|
||||
[self.weiXinLoginBtn setAttributedTitle:attri forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -106,6 +116,21 @@
|
|||
[super viewWillAppear:animated];
|
||||
[self.navigationController.navigationBar setClearNav];
|
||||
}
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)viewWillDisappear:(BOOL)animated{
|
||||
[super viewWillDisappear:animated];
|
||||
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
|
||||
[super didReceiveMemoryWarning];
|
||||
|
|
@ -172,7 +197,6 @@
|
|||
// }];
|
||||
|
||||
[self.view makeToastActivity:CSToastPositionCenter];
|
||||
|
||||
NSString *url = [NSString stringWithFormat:@"%@sys/v1/login",[GiGaServerConfig getMainUrl]];
|
||||
[GiGaNetManager userLoginrequest:url params:params completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) {
|
||||
GILog(@"%@",resDic);
|
||||
|
|
@ -181,6 +205,7 @@
|
|||
|
||||
GILog(@"**登陆***\n code:%ld\n message:%@\n *******\n",result.code,result.message);
|
||||
if (result.success) {
|
||||
//token
|
||||
[GiGaUserDefault saveToken:resDic[@"token"]];
|
||||
//埋点
|
||||
[MobClick endEvent:MobClick_UserLogin];
|
||||
|
|
@ -189,6 +214,8 @@
|
|||
GIGA_WIndowTost(@"登录成功!");
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}else{
|
||||
GIGA_ShowToast(result.message);
|
||||
}
|
||||
|
||||
}];
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
<outlet property="userImagView" destination="RIl-8E-GcR" id="lhE-Hq-pRn"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
<outlet property="weiXinLoginBtn" destination="dnL-WV-spY" id="UQI-ZD-Wuu"/>
|
||||
<outlet property="wexinbtnImageView" destination="uG0-g6-27S" id="mVD-8D-RW1"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
|
|
@ -41,7 +40,7 @@
|
|||
<constraint firstAttribute="height" constant="54" id="593-Iu-1XC"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
</textField>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Y1I-OE-6t1">
|
||||
|
|
@ -50,7 +49,7 @@
|
|||
<constraint firstAttribute="height" constant="56" id="36A-Rk-HnV"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qzA-vE-CGR">
|
||||
|
|
@ -73,8 +72,8 @@
|
|||
<constraints>
|
||||
<constraint firstAttribute="height" constant="42" id="H8S-wQ-QzQ"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<state key="normal" title=" 登 录">
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title=" 登录">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
</button>
|
||||
|
|
@ -87,33 +86,14 @@
|
|||
<state key="normal" image="btn_tab_desplay"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F5p-cf-frr">
|
||||
<rect key="frame" x="107" y="507" width="161" height="45"/>
|
||||
<rect key="frame" x="107" y="491" width="161" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="45" id="aCl-R3-YZF"/>
|
||||
<constraint firstAttribute="height" constant="40" id="aCl-R3-YZF"/>
|
||||
<constraint firstAttribute="width" constant="161" id="hOA-ag-StR"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<state key="normal" title="创建账号">
|
||||
<color key="titleColor" red="0.0" green="0.87058823529999996" blue="0.74117647060000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="btn_wechat" translatesAutoresizingMaskIntoConstraints="NO" id="uG0-g6-27S">
|
||||
<rect key="frame" x="124" y="562" width="126" height="69"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="69" id="5FG-M4-q1z"/>
|
||||
<constraint firstAttribute="width" constant="126" id="I5z-71-H7E"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dnL-WV-spY">
|
||||
<rect key="frame" x="124" y="562" width="126" height="69"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="69" id="fVe-TF-KZd"/>
|
||||
<constraint firstAttribute="width" constant="126" id="n0O-pP-3tz"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="10"/>
|
||||
<inset key="imageEdgeInsets" minX="-10" minY="2" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" title="微信账号登录" image="ic_wechat">
|
||||
<color key="titleColor" red="0.73333333333333328" green="0.73333333333333328" blue="0.73333333333333328" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="titleColor" red="0.19215686274509802" green="0.81960784313725488" blue="0.76470588235294112" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="chq-bd-6sQ">
|
||||
|
|
@ -122,7 +102,7 @@
|
|||
<constraint firstAttribute="width" constant="64" id="joP-Ev-vou"/>
|
||||
<constraint firstAttribute="height" constant="49" id="oH5-Gs-uju"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="12"/>
|
||||
<state key="normal" title="忘记密码">
|
||||
<color key="titleColor" red="0.19215686274509802" green="0.81960784313725488" blue="0.76470588235294112" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
|
|
@ -130,14 +110,33 @@
|
|||
<action selector="forgetPassBtn:" destination="-1" eventType="touchUpInside" id="GR3-Gw-sRB"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dnL-WV-spY">
|
||||
<rect key="frame" x="116" y="554" width="143" height="69"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="69" id="n98-b8-MZa"/>
|
||||
<constraint firstAttribute="width" constant="143" id="r6X-3m-usd"/>
|
||||
</constraints>
|
||||
<inset key="titleEdgeInsets" minX="-130" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<inset key="imageEdgeInsets" minX="9" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="btn_wechat">
|
||||
<attributedString key="attributedTitle">
|
||||
<fragment content="微信号登录">
|
||||
<attributes>
|
||||
<font key="NSFont" size="12" name="PingFangSC-Regular"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
|
||||
</attributes>
|
||||
</fragment>
|
||||
</attributedString>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="dnL-WV-spY" firstAttribute="top" secondItem="F5p-cf-frr" secondAttribute="bottom" constant="23" id="0vh-Hr-cIl"/>
|
||||
<constraint firstItem="8Of-JP-gMR" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="1Xh-Cl-oZI"/>
|
||||
<constraint firstItem="Yiv-h8-4V1" firstAttribute="top" secondItem="RIl-8E-GcR" secondAttribute="bottom" constant="16" id="4qd-F2-kp1"/>
|
||||
<constraint firstItem="chq-bd-6sQ" firstAttribute="top" secondItem="ZJU-Uo-5TM" secondAttribute="bottom" constant="16" id="68l-K4-uY8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qzA-vE-CGR" secondAttribute="trailing" constant="65" id="9hg-No-Rbp"/>
|
||||
<constraint firstItem="uG0-g6-27S" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="AYb-IB-2Uf"/>
|
||||
<constraint firstItem="Szo-8C-Zin" firstAttribute="leading" secondItem="Y1I-OE-6t1" secondAttribute="trailing" constant="14" id="Ba4-21-nhi"/>
|
||||
<constraint firstItem="8Of-JP-gMR" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="F77-OA-qbT"/>
|
||||
<constraint firstItem="Y1I-OE-6t1" firstAttribute="top" secondItem="qzA-vE-CGR" secondAttribute="bottom" constant="14" id="FzB-6D-IYx"/>
|
||||
|
|
@ -146,20 +145,19 @@
|
|||
<constraint firstItem="F5p-cf-frr" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="MgV-ph-Nz2"/>
|
||||
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="width" secondItem="qzA-vE-CGR" secondAttribute="width" id="Nfi-Mk-t19"/>
|
||||
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="Qub-d1-Mfd"/>
|
||||
<constraint firstItem="1vd-yc-0a5" firstAttribute="bottom" secondItem="uG0-g6-27S" secondAttribute="bottom" constant="36" id="UT1-bV-WrO"/>
|
||||
<constraint firstItem="dnL-WV-spY" firstAttribute="leading" secondItem="uG0-g6-27S" secondAttribute="leading" id="V8O-58-b1F"/>
|
||||
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="top" secondItem="Y1I-OE-6t1" secondAttribute="bottom" constant="8" id="WmU-UK-hwV"/>
|
||||
<constraint firstItem="qzA-vE-CGR" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="ZAX-Q0-wIE"/>
|
||||
<constraint firstItem="Szo-8C-Zin" firstAttribute="centerY" secondItem="Y1I-OE-6t1" secondAttribute="centerY" id="a5D-rG-Cqf"/>
|
||||
<constraint firstItem="dnL-WV-spY" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="eWL-Ih-wBt"/>
|
||||
<constraint firstItem="chq-bd-6sQ" firstAttribute="trailing" secondItem="ZJU-Uo-5TM" secondAttribute="trailing" id="f3g-Rk-Fbd"/>
|
||||
<constraint firstItem="F5p-cf-frr" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="21" id="hqv-KT-isO"/>
|
||||
<constraint firstItem="F5p-cf-frr" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="5" id="hqv-KT-isO"/>
|
||||
<constraint firstItem="8Of-JP-gMR" firstAttribute="top" secondItem="chq-bd-6sQ" secondAttribute="bottom" constant="11" id="kQN-mZ-Kew"/>
|
||||
<constraint firstItem="RIl-8E-GcR" firstAttribute="leading" secondItem="1vd-yc-0a5" secondAttribute="leading" constant="131" id="kRM-p6-38K"/>
|
||||
<constraint firstItem="Szo-8C-Zin" firstAttribute="trailing" secondItem="Yiv-h8-4V1" secondAttribute="trailing" id="py7-9K-mmp"/>
|
||||
<constraint firstItem="qzA-vE-CGR" firstAttribute="top" secondItem="Yiv-h8-4V1" secondAttribute="bottom" id="uYb-wj-NLt"/>
|
||||
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="1vd-yc-0a5" secondAttribute="top" constant="82" id="vOK-NT-5LM"/>
|
||||
<constraint firstItem="Yiv-h8-4V1" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="y10-W0-LYh"/>
|
||||
<constraint firstItem="Y1I-OE-6t1" firstAttribute="leading" secondItem="qzA-vE-CGR" secondAttribute="leading" id="zC7-Wr-oTQ"/>
|
||||
<constraint firstItem="1vd-yc-0a5" firstAttribute="bottom" secondItem="dnL-WV-spY" secondAttribute="bottom" constant="36" id="zYe-Aa-RIJ"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="1vd-yc-0a5"/>
|
||||
<point key="canvasLocation" x="10.5" y="22.5"/>
|
||||
|
|
@ -168,7 +166,6 @@
|
|||
<resources>
|
||||
<image name="btn_tab_desplay" width="45" height="20"/>
|
||||
<image name="btn_wechat" width="126" height="25"/>
|
||||
<image name="ic_wechat" width="19" height="17"/>
|
||||
<image name="img_circle_avatar" width="114" height="114"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface PassWordResetVC : UIViewController
|
||||
#import "GiGaBaseViewController.h"
|
||||
@interface PassWordResetVC : GiGaBaseViewController
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
//
|
||||
|
||||
#import "PassWordResetVC.h"
|
||||
#import "NSTimer+Convenience.h"
|
||||
#import "GiGaBaseAPiRequest.h"
|
||||
|
||||
@interface PassWordResetVC ()
|
||||
@property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField;
|
||||
|
|
@ -15,64 +17,170 @@
|
|||
|
||||
@property (weak, nonatomic) IBOutlet UITextField *passNewTextField;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmBtn;
|
||||
|
||||
@property(nonatomic,strong) NSTimer*timer;
|
||||
@property(nonatomic) NSInteger time;
|
||||
@end
|
||||
|
||||
@implementation PassWordResetVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.title = @"重置密码";
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
//self.title = @"重置密码";
|
||||
[self addNavTitile:@"重置密码"];
|
||||
[self confirmUI];
|
||||
_time = 60;
|
||||
[self.codeSendBtn addTarget:self action:@selector(codeSendBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.confirmBtn addTarget:self action:@selector(confirmBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
|
||||
-(void)confirmUI{
|
||||
|
||||
|
||||
UIView *phoneView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||
phoneView.backgroundColor = [UIColor redColor];
|
||||
UIImageView *phoneIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)];
|
||||
phoneIcon.image = [UIImage imageNamed:@""];
|
||||
|
||||
UIImageView *phoneIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 9, 12, 22)];
|
||||
phoneIcon.image = [UIImage imageNamed:@"ic_number"];
|
||||
[phoneView addSubview:phoneIcon];
|
||||
self.phoneNumberTextField.leftView = phoneView;
|
||||
self.phoneNumberTextField.leftViewMode = UITextFieldViewModeAlways;
|
||||
|
||||
UIView *codeView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||
codeView.backgroundColor = [UIColor redColor];
|
||||
UIImageView *codeIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)];
|
||||
codeIcon.image = [UIImage imageNamed:@""];
|
||||
|
||||
UIImageView *codeIcon = [[UIImageView alloc] initWithFrame:CGRectMake(11,13.5, 18, 13)];
|
||||
codeIcon.image = [UIImage imageNamed:@"ic_note"];
|
||||
[codeView addSubview:codeIcon];
|
||||
self.codeTextField.leftView = codeView;
|
||||
self.codeTextField.leftViewMode = UITextFieldViewModeAlways;
|
||||
|
||||
[self.passNewTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKey:@"_placeholderLabel.textColor"];
|
||||
|
||||
UIView *passView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||
passView.backgroundColor = [UIColor redColor];
|
||||
UIImageView *passIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)];
|
||||
passIcon.image = [UIImage imageNamed:@""];
|
||||
UIImageView *passIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,10, 12, 22)];
|
||||
passIcon.image = [UIImage imageNamed:@"icon_key"];
|
||||
[passView addSubview:passIcon];
|
||||
self.passNewTextField.leftView = passView;
|
||||
self.passNewTextField.leftViewMode = UITextFieldViewModeAlways;
|
||||
|
||||
self.confirmBtn.layer.masksToBounds = YES;
|
||||
self.confirmBtn.layer.cornerRadius = self.confirmBtn.frame.size.height / 2;
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - 发送短信
|
||||
//短信发送
|
||||
-(void)codeSendBtnAction:(UIButton *)btn{
|
||||
if (self.phoneNumberTextField.text.length == 0) {
|
||||
GIGA_ShowToast(@"请输入手机号");
|
||||
return;
|
||||
}
|
||||
if (![GiGaHelper isPhoneNumber:self.phoneNumberTextField.text]) {
|
||||
GIGA_ShowToast(@"请输入正确手机号");
|
||||
return;
|
||||
}
|
||||
btn.userInteractionEnabled = NO;
|
||||
|
||||
[self startTimer:btn];
|
||||
[self requstCode:btn];
|
||||
}
|
||||
//计时
|
||||
-(void)startTimer:(UIButton *)btn{
|
||||
|
||||
if (_time>0) {
|
||||
_timer = [NSTimer scheduledTimerWithTimeInterval:1 count:60 callback:^{
|
||||
NSString *timeStr=[NSString stringWithFormat:@"%lds",(long)self->_time];
|
||||
[btn setTitle:timeStr forState:UIControlStateNormal];
|
||||
self->_time--;
|
||||
|
||||
if (self->_time==0) {
|
||||
[self.codeSendBtn setTitle:@"发送验证码" forState:UIControlStateNormal];
|
||||
self->_time =60;
|
||||
btn.userInteractionEnabled = YES;
|
||||
}
|
||||
|
||||
}];
|
||||
[[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
|
||||
}
|
||||
}
|
||||
|
||||
//获取验证码请求
|
||||
-(void)requstCode:(UIButton *)btn{
|
||||
|
||||
if (self.phoneNumberTextField.text.length == 0) {
|
||||
GIGA_ShowToast(@"请输入手机号");
|
||||
return;
|
||||
}
|
||||
if (![GiGaHelper isPhoneNumber:self.phoneNumberTextField.text]) {
|
||||
GIGA_ShowToast(@"请输入正确手机号");
|
||||
return;
|
||||
}
|
||||
|
||||
[self.view makeToastActivity:CSToastPositionCenter];
|
||||
NSDictionary *params = @{@"mobile":self.phoneNumberTextField.text};
|
||||
GiGaBaseAPiRequest *requst = [GiGaBaseAPiRequest initWithRequestPath:@"msg/sms/v1/retrievesendcode" method:RequestPostMethod parms:params];
|
||||
[requst requstDataWithResult:^(GiGaAPIResult *result) {
|
||||
btn.userInteractionEnabled = YES;
|
||||
[self.view hideToastActivity];
|
||||
GIGA_ShowToast(result.message);
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - 确认
|
||||
-(void)confirmBtnAction:(UIButton *)btn{
|
||||
|
||||
if (self.phoneNumberTextField.text.length == 0) {
|
||||
GIGA_ShowToast(@"请输入手机号");
|
||||
return;
|
||||
}
|
||||
if (![GiGaHelper isPhoneNumber:self.phoneNumberTextField.text]) {
|
||||
GIGA_ShowToast(@"请输入正确手机号");
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.codeTextField.text.length == 0) {
|
||||
GIGA_ShowToast(@"请输入验证码");
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.passNewTextField.text.length == 0) {
|
||||
GIGA_ShowToast(@"请输入新密码");
|
||||
return;
|
||||
}
|
||||
if (!(self.passNewTextField.text.length >= 6 && self.passNewTextField.text.length <= 20)) {
|
||||
GIGA_ShowToast(@"请输入6~20位新密码");
|
||||
return;
|
||||
}
|
||||
btn.userInteractionEnabled = NO;
|
||||
[self.view makeToastActivity:CSToastPositionCenter];
|
||||
NSDictionary *params = @{
|
||||
@"username":self.phoneNumberTextField.text,
|
||||
@"password":self.passNewTextField.text,
|
||||
@"verifiedCode":self.codeTextField.text
|
||||
|
||||
};
|
||||
GiGaBaseAPiRequest *requst = [GiGaBaseAPiRequest initWithRequestPath:@"sys/v1/retrievepwd" method:RequestPostMethod parms:params];
|
||||
[requst requstDataWithResult:^(GiGaAPIResult *result) {
|
||||
[self.view hideToastActivity];
|
||||
btn.userInteractionEnabled = YES;
|
||||
if (result.success) {
|
||||
GIGA_WIndowTost(result.message);
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
-(void)dealloc{
|
||||
if (_timer) {
|
||||
[_timer unfireTimer];
|
||||
[_timer invalidate];
|
||||
_timer = nil;
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -25,103 +25,107 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入手机号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gY9-PP-yev">
|
||||
<rect key="frame" x="43" y="97" width="289" height="40"/>
|
||||
<rect key="frame" x="65" y="107" width="245" height="51"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="yoq-8B-w5c"/>
|
||||
<constraint firstAttribute="height" constant="51" id="hdC-Ue-b1i"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eTv-jk-ONL">
|
||||
<rect key="frame" x="43" y="145" width="289" height="1"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<rect key="frame" x="65" y="159" width="245" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="dNM-XE-6RY"/>
|
||||
<constraint firstAttribute="height" constant="1" id="oPc-M9-lzE"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="短信验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="nCj-Hg-8pQ">
|
||||
<rect key="frame" x="43" y="173" width="289" height="40"/>
|
||||
<rect key="frame" x="65" y="162" width="148" height="51"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="ioe-Op-8gQ"/>
|
||||
<constraint firstAttribute="height" constant="51" id="bP2-dP-V9B"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rno-VM-u1V">
|
||||
<rect key="frame" x="43" y="221" width="289" height="1"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<rect key="frame" x="65" y="214" width="245" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="2Xf-HW-K8d"/>
|
||||
<constraint firstAttribute="height" constant="1" id="I0I-Rj-P4f"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rm0-UH-T6r">
|
||||
<rect key="frame" x="43" y="285" width="289" height="1"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<rect key="frame" x="65" y="273" width="245" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="eFI-tx-VRV"/>
|
||||
<constraint firstAttribute="height" constant="1" id="pu6-ak-TJR"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入新的登录密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="MHD-nb-UXj">
|
||||
<rect key="frame" x="43" y="237" width="289" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="W7U-Rm-Rvm"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dv2-ja-F8y">
|
||||
<rect key="frame" x="238" y="169" width="94" height="48"/>
|
||||
<rect key="frame" x="227" y="162" width="83" height="51"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="94" id="FpG-3G-Wne"/>
|
||||
<constraint firstAttribute="height" constant="48" id="LDX-cC-LYa"/>
|
||||
<constraint firstAttribute="height" constant="51" id="bin-f7-lIk"/>
|
||||
<constraint firstAttribute="width" constant="83" id="jyJ-IU-vK2"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<state key="normal" title="发送验证码">
|
||||
<color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
|
||||
<inset key="titleEdgeInsets" minX="-84" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" title="发送验证码" image="btn_meaasag">
|
||||
<color key="titleColor" red="0.60784313725490191" green="0.60784313725490191" blue="0.60784313725490191" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w3j-WU-gmW">
|
||||
<rect key="frame" x="43" y="343" width="289" height="44"/>
|
||||
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<rect key="frame" x="87" y="316" width="200" height="41"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.87058823529411766" blue="0.74117647058823533" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="rMD-6U-hj0"/>
|
||||
<constraint firstAttribute="height" constant="41" id="q8T-c9-PAl"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="18"/>
|
||||
<state key="normal" title="确 认">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
</button>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="输入新的登录密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="MHD-nb-UXj">
|
||||
<rect key="frame" x="65" y="221" width="245" height="51"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="51" id="mAg-kT-tQz"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="top" secondItem="eTv-jk-ONL" secondAttribute="bottom" constant="27" id="7Rp-Jb-dMt"/>
|
||||
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="width" secondItem="gY9-PP-yev" secondAttribute="width" id="Bq0-5q-qAM"/>
|
||||
<constraint firstItem="rno-VM-u1V" firstAttribute="width" secondItem="nCj-Hg-8pQ" secondAttribute="width" id="CMx-ZE-SCl"/>
|
||||
<constraint firstItem="Dv2-ja-F8y" firstAttribute="trailing" secondItem="nCj-Hg-8pQ" secondAttribute="trailing" id="ELP-ab-bxy"/>
|
||||
<constraint firstItem="eTv-jk-ONL" firstAttribute="width" secondItem="gY9-PP-yev" secondAttribute="width" id="FJo-eR-4IW"/>
|
||||
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Ip3-fu-Ab5"/>
|
||||
<constraint firstItem="rno-VM-u1V" firstAttribute="top" secondItem="nCj-Hg-8pQ" secondAttribute="bottom" constant="8" id="JT0-3X-s12"/>
|
||||
<constraint firstItem="rm0-UH-T6r" firstAttribute="top" secondItem="MHD-nb-UXj" secondAttribute="bottom" constant="8" id="Lab-21-Am5"/>
|
||||
<constraint firstItem="gY9-PP-yev" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="97" id="N5z-r9-plE"/>
|
||||
<constraint firstItem="eTv-jk-ONL" firstAttribute="top" secondItem="gY9-PP-yev" secondAttribute="bottom" constant="8" id="Pyp-bG-ANr"/>
|
||||
<constraint firstItem="MHD-nb-UXj" firstAttribute="top" secondItem="rno-VM-u1V" secondAttribute="bottom" constant="15" id="Upp-s9-MAJ"/>
|
||||
<constraint firstItem="MHD-nb-UXj" firstAttribute="width" secondItem="nCj-Hg-8pQ" secondAttribute="width" id="Z1W-dz-bRy"/>
|
||||
<constraint firstItem="gY9-PP-yev" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="43" id="bPv-7M-n3u"/>
|
||||
<constraint firstItem="rno-VM-u1V" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="bu8-ma-nFV"/>
|
||||
<constraint firstItem="rm0-UH-T6r" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="ciw-0d-uLr"/>
|
||||
<constraint firstItem="rm0-UH-T6r" firstAttribute="width" secondItem="MHD-nb-UXj" secondAttribute="width" id="cjR-SV-mNL"/>
|
||||
<constraint firstItem="w3j-WU-gmW" firstAttribute="width" secondItem="MHD-nb-UXj" secondAttribute="width" id="f9d-va-eRT"/>
|
||||
<constraint firstItem="w3j-WU-gmW" firstAttribute="top" secondItem="rm0-UH-T6r" secondAttribute="bottom" constant="57" id="hD7-Dt-DAs"/>
|
||||
<constraint firstItem="eTv-jk-ONL" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="j3f-mJ-dgC"/>
|
||||
<constraint firstItem="gY9-PP-yev" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="nQx-N0-rE4"/>
|
||||
<constraint firstItem="w3j-WU-gmW" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="oDc-Cu-4pY"/>
|
||||
<constraint firstItem="Dv2-ja-F8y" firstAttribute="centerY" secondItem="nCj-Hg-8pQ" secondAttribute="centerY" id="oxc-Vq-ekG"/>
|
||||
<constraint firstItem="MHD-nb-UXj" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="sag-zh-3M2"/>
|
||||
<constraint firstItem="gY9-PP-yev" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="0wd-N9-CJi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rm0-UH-T6r" secondAttribute="trailing" constant="65" id="3Ze-9p-DXQ"/>
|
||||
<constraint firstItem="eTv-jk-ONL" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="3f8-py-rVY"/>
|
||||
<constraint firstItem="rno-VM-u1V" firstAttribute="top" secondItem="nCj-Hg-8pQ" secondAttribute="bottom" constant="1" id="7B6-yw-Ang"/>
|
||||
<constraint firstItem="MHD-nb-UXj" firstAttribute="width" secondItem="gY9-PP-yev" secondAttribute="width" id="9Rj-pz-EBS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eTv-jk-ONL" secondAttribute="trailing" constant="65" id="9mt-NK-XDb"/>
|
||||
<constraint firstItem="w3j-WU-gmW" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="87" id="Abo-oW-YM4"/>
|
||||
<constraint firstItem="Dv2-ja-F8y" firstAttribute="leading" secondItem="nCj-Hg-8pQ" secondAttribute="trailing" constant="14" id="C7G-Au-fA7"/>
|
||||
<constraint firstItem="eTv-jk-ONL" firstAttribute="top" secondItem="gY9-PP-yev" secondAttribute="bottom" constant="1" id="Esi-VW-e2G"/>
|
||||
<constraint firstItem="gY9-PP-yev" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="GjR-Hw-LgY"/>
|
||||
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="leading" secondItem="gY9-PP-yev" secondAttribute="leading" id="K4P-aZ-p4J"/>
|
||||
<constraint firstItem="rm0-UH-T6r" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="OKP-bj-u5F"/>
|
||||
<constraint firstItem="w3j-WU-gmW" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Qx9-jw-ZFV"/>
|
||||
<constraint firstItem="rm0-UH-T6r" firstAttribute="top" secondItem="MHD-nb-UXj" secondAttribute="bottom" constant="1" id="WqS-Ct-q67"/>
|
||||
<constraint firstItem="rno-VM-u1V" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="65" id="aJl-ZC-hPs"/>
|
||||
<constraint firstItem="Dv2-ja-F8y" firstAttribute="trailing" secondItem="gY9-PP-yev" secondAttribute="trailing" id="bbV-7x-WFt"/>
|
||||
<constraint firstItem="nCj-Hg-8pQ" firstAttribute="top" secondItem="gY9-PP-yev" secondAttribute="bottom" constant="4" id="gP5-TX-MXq"/>
|
||||
<constraint firstItem="Dv2-ja-F8y" firstAttribute="centerY" secondItem="nCj-Hg-8pQ" secondAttribute="centerY" id="jWN-Se-6P6"/>
|
||||
<constraint firstItem="MHD-nb-UXj" firstAttribute="top" secondItem="rno-VM-u1V" secondAttribute="bottom" constant="6" id="mrM-C1-VFv"/>
|
||||
<constraint firstItem="gY9-PP-yev" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="107" id="qsl-vw-gFU"/>
|
||||
<constraint firstItem="w3j-WU-gmW" firstAttribute="top" secondItem="rm0-UH-T6r" secondAttribute="bottom" constant="42" id="sFk-c0-xql"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rno-VM-u1V" secondAttribute="trailing" constant="65" id="sKR-zI-qG4"/>
|
||||
<constraint firstItem="MHD-nb-UXj" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="wco-Sk-bTY"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="33.5" y="53.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="btn_meaasag" width="76" height="22"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
make.centerX.mas_equalTo(self.view.mas_centerX);
|
||||
make.top.mas_equalTo(self.view.mas_top).offset(200);
|
||||
}];
|
||||
|
||||
dismisBtn.layer.masksToBounds = YES;
|
||||
dismisBtn.layer.cornerRadius = 15;
|
||||
|
||||
|
|
@ -47,7 +46,6 @@
|
|||
|
||||
-(void)dismisBtnAction{
|
||||
|
||||
|
||||
[self dismissViewControllerAnimated:YES completion:^{
|
||||
NC_POST_NAME_OBJECT(APP_GUARD_DISSMISS, nil);
|
||||
}];
|
||||
|
|
@ -58,14 +56,4 @@
|
|||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@
|
|||
//@property (nonatomic,strong) GiGaFlyingCommitInputView *commitInputView;
|
||||
@property(nonatomic,strong) UIImageView *maskImageView;
|
||||
@property(nonatomic,strong) UIImageView *faceView;
|
||||
@property(nonatomic,strong) UIDynamicAnimator *animator;
|
||||
@property(nonatomic,strong) UIAttachmentBehavior *attachmentBehavior;
|
||||
//@property(nonatomic,strong) UIDynamicAnimator *animator;
|
||||
//@property(nonatomic,strong) UIAttachmentBehavior *attachmentBehavior;
|
||||
@property(nonatomic) CGPoint attachPoint;
|
||||
@property(nonatomic) UISnapBehavior *snapBehavior;
|
||||
//@property(nonatomic) UISnapBehavior *snapBehavior;
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -167,11 +167,31 @@
|
|||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
}
|
||||
|
||||
BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
|
||||
if (showAppGaurd == NO) {
|
||||
[self showAPPappGaurdView];
|
||||
}
|
||||
}
|
||||
-(void)viewWillDisappear:(BOOL)animated{
|
||||
[super viewWillDisappear:animated];
|
||||
if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
|
||||
[self setUpNav];
|
||||
[self initUI];
|
||||
[self addNotify];
|
||||
|
|
@ -185,7 +205,7 @@
|
|||
[self.view bringSubviewToFront:self.maskImageView];
|
||||
[self.view addSubview:self.countLabel];
|
||||
|
||||
self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];
|
||||
//self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];
|
||||
|
||||
//face
|
||||
[self.faceView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
|
@ -361,7 +381,6 @@
|
|||
|
||||
if (isUserLogin) {
|
||||
|
||||
//GIGA_ShowToast(@"userLogin!");
|
||||
GiGaQuestionVC *questionVC = [[GiGaQuestionVC alloc] init];
|
||||
[self.navigationController pushViewController:questionVC animated:YES];
|
||||
|
||||
|
|
@ -372,15 +391,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
|
||||
|
||||
if (!showAppGaurd) {
|
||||
[self showAPPappGaurdView];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void)addNotify{
|
||||
|
||||
|
|
@ -405,7 +416,7 @@
|
|||
-(void)appGauardViewDissmiss{
|
||||
//出现新手引导
|
||||
BOOL isshowGaurd = [GiGaUserDefault isShowedGaurd];
|
||||
if (!isshowGaurd) {
|
||||
if (isshowGaurd == NO) {
|
||||
NSLog(@"%d",(int)isshowGaurd );
|
||||
[self showUserGaurdView];
|
||||
}
|
||||
|
|
@ -434,6 +445,7 @@
|
|||
|
||||
#pragma mark App引导页
|
||||
-(void)showAPPappGaurdView{
|
||||
|
||||
GiGaAppGaurdVC *gaurdVC = [[GiGaAppGaurdVC alloc] init];
|
||||
[self presentViewController:gaurdVC animated:YES completion:nil];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue