Initial commit

This commit is contained in:
lianxiang
2018-08-22 11:15:52 +08:00
parent d98e20881f
commit 249bf6864e
491 changed files with 68665 additions and 7 deletions
@@ -0,0 +1,13 @@
//
// GiGaExercisesViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/13.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GiGaExercisesViewController : UIViewController
@end
@@ -0,0 +1,37 @@
//
// GiGaExercisesViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/13.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaExercisesViewController.h"
@interface GiGaExercisesViewController ()
@end
@implementation GiGaExercisesViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (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.
}
*/
@end
@@ -0,0 +1,13 @@
//
// GiGaRegistViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GiGaRegistViewController : UIViewController
@end
@@ -0,0 +1,102 @@
//
// GiGaRegistViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaRegistViewController.h"
#import "TTTAttributedLabel.h"
#import "GiGaWebViewController.h"
@interface GiGaRegistViewController ()<TTTAttributedLabelDelegate>
@property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField;
@property (weak, nonatomic) IBOutlet UITextField *codeTextField;
@property (weak, nonatomic) IBOutlet UIButton *sendCodeBtn;
@property (weak, nonatomic) IBOutlet UITextField *passTexFied;
@property (weak, nonatomic) IBOutlet UIButton *checkBtn;
@property (weak, nonatomic) IBOutlet UIButton *registBtn;
@property (weak, nonatomic) IBOutlet TTTAttributedLabel *useragreementLabel;
@end
@implementation GiGaRegistViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"注册";
// Do any additional setup after loading the view from its nib.
[self confirmUI];
}
-(void)confirmUI{
self.useragreementLabel.highlightedTextColor = [UIColor lightGrayColor];
self.useragreementLabel.delegate = self;
self.useragreementLabel.enabledTextCheckingTypes= NSTextCheckingTypePhoneNumber|NSTextCheckingTypeAddress|NSTextCheckingTypeLink;
self.useragreementLabel.linkAttributes = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:(NSString *)kCTUnderlineStyleAttributeName];
//链接正常状态文本属性NSTextCheckingTypeLink;
NSString *text = @"已阅读并同意《用户服务协议》";
[self.useragreementLabel setText:text afterInheritingLabelAttributesAndConfiguringWithBlock:^NSMutableAttributedString *(NSMutableAttributedString *mutableAttributedString) {
NSRange fontRange = [[mutableAttributedString string] rangeOfString:@"用户服务协议" options:NSCaseInsensitiveSearch];
UIFont* sysFont = [UIFont systemFontOfSize:15];
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];
}
return mutableAttributedString;
}];
NSRange fontRange = [text rangeOfString:@"用户服务协议" options:NSCaseInsensitiveSearch];
[self.useragreementLabel addLinkToTransitInformation:@{
@"SourceName":@"useragreement"
} withRange:fontRange];
}
#pragma mark - TTTAttributedLabelDelegate
-(void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url
{
}
-(void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithTransitInformation:(NSDictionary *)components
{
NSLog(@"components%@",components);
// GiGaWebViewController *webView = [[GiGaWebViewController alloc] init];
// webView.souceType = WebSourceTypeLoacalHtml;
// webView.fileName = components[@"SourceName"];
// [self.navigationController pushViewController:webView animated:YES];
GiGaWebViewController *webView = [[GiGaWebViewController alloc] init];
webView.souceType = WebSourceTypeUrlLink;
webView.url = @"http://www.youtansu.com";
[self.navigationController pushViewController:webView animated: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.
}
*/
@end
@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GiGaRegistViewController">
<connections>
<outlet property="checkBtn" destination="b06-w9-r2g" id="Cv8-zo-QoL"/>
<outlet property="codeTextField" destination="dR7-iu-Eup" id="wNt-AE-gpM"/>
<outlet property="passTexFied" destination="UUC-74-fsa" id="4hR-y9-jDa"/>
<outlet property="phoneNumberTextField" destination="uJG-KF-a91" id="Pr4-XG-hZQ"/>
<outlet property="registBtn" destination="hZA-nj-Wmu" id="075-qU-XS3"/>
<outlet property="sendCodeBtn" destination="qAH-Fa-AmF" id="jh3-Ug-Whq"/>
<outlet property="useragreementLabel" destination="Vxb-TL-wDd" id="0Uj-cv-1Di"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<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="75" width="84" height="84"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<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"/>
</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="183" width="303" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="HLZ-Al-gsF"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</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="241" width="303" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="kFj-lZ-f1b"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</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="298" width="303" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="ZXN-7M-Ya1"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ubQ-Za-dV7">
<rect key="frame" x="36" y="231" width="303" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="ZnO-2U-V61"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Trq-bz-kQT">
<rect key="frame" x="36" y="289" width="303" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="VhP-k3-4oj"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pb5-1e-TXp">
<rect key="frame" x="36" y="346" width="303" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="p8o-Oo-C9M"/>
</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="237" width="87" height="48"/>
<constraints>
<constraint firstAttribute="width" constant="87" id="HC3-fN-xKP"/>
<constraint firstAttribute="height" constant="48" id="iQo-1Y-aPA"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="发送验证码">
<color key="titleColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</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="373" width="33" height="27"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="27" id="TwO-WB-jNy"/>
<constraint firstAttribute="width" constant="33" id="n2h-mQ-iLM"/>
</constraints>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hZA-nj-Wmu">
<rect key="frame" x="36" y="434" width="303" height="48"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="1ii-ua-NM2"/>
</constraints>
<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="TTTAttributedLabel">
<rect key="frame" x="77" y="376" width="42" height="21"/>
<fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</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="Q5M-cg-NOt" 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="Q5M-cg-NOt" 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="Q5M-cg-NOt" 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="Q5M-cg-NOt" secondAttribute="centerX" id="GsV-nH-ZTs"/>
<constraint firstItem="SEO-0F-Irb" firstAttribute="centerX" secondItem="Q5M-cg-NOt" 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="Q5M-cg-NOt" secondAttribute="top" constant="55" id="Xk1-QJ-vEV"/>
<constraint firstItem="uJG-KF-a91" firstAttribute="leading" secondItem="Q5M-cg-NOt" 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="Q5M-cg-NOt" secondAttribute="centerX" id="fDj-om-PCx"/>
<constraint firstItem="ubQ-Za-dV7" firstAttribute="centerX" secondItem="Q5M-cg-NOt" 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="Q5M-cg-NOt" 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"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>
</document>
@@ -0,0 +1,13 @@
//
// GiGaUserLoginVC.h
// GIGA
//
// Created by lianxiang on 2018/8/20.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaBaseNavViewController.h"
@interface GiGaUserLoginVC : UIViewController
@end
@@ -0,0 +1,110 @@
//
// GiGaUserLoginVC.m
// GIGA
//
// Created by lianxiang on 2018/8/20.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaUserLoginVC.h"
#import "UINavigationBar+Custom.h"
#import "PassWordResetVC.h"
#import "GiGaRegistViewController.h"
@interface GiGaUserLoginVC ()
@property (weak, nonatomic) IBOutlet UIImageView *userImagView;
@property (weak, nonatomic) IBOutlet UITextField *acountTextField;
@property (weak, nonatomic) IBOutlet UITextField *passwordTextField;
@property (weak, nonatomic) IBOutlet UIButton *loginBtn;
@property (weak, nonatomic) IBOutlet UIButton *weiXinLoginBtn;
@property (weak, nonatomic) IBOutlet UIButton *registBtn;
@end
@implementation GiGaUserLoginVC
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
[self setUpX];
[self textFieldUI];
[self.registBtn addTarget:self action:@selector(registBtnAction) forControlEvents:UIControlEventTouchUpInside];
}
-(void)setUpX{
UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
rightBtn.frame = CGRectMake(0, 0, 40, 40);
rightBtn.backgroundColor = [UIColor blueColor];
[rightBtn setImage:[UIImage imageNamed:@"maske_dismiss_waring"] forState:UIControlStateNormal];
[rightBtn addTarget:self action:@selector(rightBtnAction) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
}
-(void)textFieldUI{
[self.acountTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKey:@"_placeholderLabel.textColor"];
UIView *acountView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
acountView.backgroundColor = [UIColor redColor];
UIImageView *acountViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)];
acountViewIcon.image = [UIImage imageNamed:@""];
[acountView addSubview:acountViewIcon];
self.acountTextField.leftView = acountView;
self.acountTextField.leftViewMode = UITextFieldViewModeAlways;
[self.passwordTextField 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 *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)];
passViewIcon.image = [UIImage imageNamed:@""];
[passView addSubview:passViewIcon];
self.passwordTextField.leftView = passView;
self.passwordTextField.leftViewMode = UITextFieldViewModeAlways;
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;
}
-(void)rightBtnAction{
[self dismissViewControllerAnimated:YES completion:nil];
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController.navigationBar setClearNav];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)forgetPassBtn:(id)sender {
PassWordResetVC *passVC= [[PassWordResetVC alloc] init];
[self.navigationController pushViewController:passVC animated:YES];
}
-(void)registBtnAction{
GiGaRegistViewController *registVC = [[GiGaRegistViewController alloc] init];
[self.navigationController pushViewController:registVC animated:YES];
}
@end
@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GiGaUserLoginVC">
<connections>
<outlet property="acountTextField" destination="Yiv-h8-4V1" id="bT2-8W-ab2"/>
<outlet property="loginBtn" destination="8Of-JP-gMR" id="uRE-2y-IZt"/>
<outlet property="passwordTextField" destination="Y1I-OE-6t1" id="Jgj-sC-7MX"/>
<outlet property="registBtn" destination="F5p-cf-frr" id="eHE-mU-8Xf"/>
<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"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<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="RIl-8E-GcR">
<rect key="frame" x="137" y="64" width="100" height="100"/>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="RIl-8E-GcR" secondAttribute="height" multiplier="1:1" id="kf7-fa-NKy"/>
<constraint firstAttribute="height" constant="100" id="npT-8X-kmx"/>
</constraints>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="账号" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Yiv-h8-4V1">
<rect key="frame" x="32" y="180" width="309" height="30"/>
<color key="backgroundColor" red="0.99607843139999996" green="0.94117647059999998" blue="0.69803921570000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="LOI-yC-v4S"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Y1I-OE-6t1">
<rect key="frame" x="33" y="244" width="309" height="30"/>
<color key="backgroundColor" red="0.99607843139999996" green="0.94117647059999998" blue="0.69803921570000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="eG3-4a-G4H"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qzA-vE-CGR">
<rect key="frame" x="33" y="214" width="309" height="1"/>
<color key="backgroundColor" red="0.74901960779999999" green="0.74509803919999995" blue="0.74509803919999995" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Nz8-a3-phJ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZJU-Uo-5TM">
<rect key="frame" x="33.5" y="279" width="309" height="1"/>
<color key="backgroundColor" red="0.74901960779999999" green="0.74509803919999995" blue="0.74509803919999995" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="NqZ-5s-7Mg"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="chq-bd-6sQ">
<rect key="frame" x="281" y="295" width="60" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="3Nq-gh-4BK"/>
<constraint firstAttribute="width" constant="60" id="Pv8-8w-ASz"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<state key="normal" title="忘记密码">
<color key="titleColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="forgetPassBtn:" destination="-1" eventType="touchUpInside" id="GR3-Gw-sRB"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Of-JP-gMR">
<rect key="frame" x="33" y="357" width="309" height="42"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="0l3-lV-ZMK"/>
</constraints>
<fontDescription key="fontDescription" name=".PingFangSC-Regular" family=".PingFang SC" pointSize="15"/>
<state key="normal" title=" 登 录">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="F5p-cf-frr">
<rect key="frame" x="144" y="419" width="87" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="87" id="7xs-hL-39d"/>
<constraint firstAttribute="height" constant="30" id="Q2v-So-LQo"/>
</constraints>
<state key="normal" title="创建账号"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qbr-kJ-U7P">
<rect key="frame" x="33" y="510" width="129" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="95X-YC-qXA"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mxE-Tx-0Us">
<rect key="frame" x="220" y="510" width="122" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="bG5-pf-mm7"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="OR" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Zl-ot-dVW">
<rect key="frame" x="175.5" y="500" width="24" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="2XR-pF-nnJ"/>
<constraint firstAttribute="height" constant="21" id="bg5-RC-uB6"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dnL-WV-spY">
<rect key="frame" x="33" y="535" width="309" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="rYQ-VZ-BLB"/>
</constraints>
<state key="normal" title="微信账号登录"/>
</button>
</subviews>
<constraints>
<constraint firstItem="mxE-Tx-0Us" firstAttribute="centerY" secondItem="5Zl-ot-dVW" secondAttribute="centerY" id="3cA-BV-qmd"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="4eY-sT-DtU"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="top" secondItem="5Zl-ot-dVW" secondAttribute="bottom" constant="14" id="65m-zQ-bWl"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="44" id="6CN-xC-x9g"/>
<constraint firstItem="5Zl-ot-dVW" firstAttribute="leading" secondItem="Qbr-kJ-U7P" secondAttribute="trailing" constant="13.5" id="7Lh-zH-OQP"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="width" secondItem="Y1I-OE-6t1" secondAttribute="width" id="7og-vA-Mtc"/>
<constraint firstItem="chq-bd-6sQ" firstAttribute="top" secondItem="ZJU-Uo-5TM" secondAttribute="bottom" constant="15" id="7th-F3-6VD"/>
<constraint firstItem="Qbr-kJ-U7P" firstAttribute="leading" secondItem="8Of-JP-gMR" secondAttribute="leading" id="ANZ-UH-EG0"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="EiB-Tt-lhg"/>
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="chq-bd-6sQ" secondAttribute="trailing" constant="34" id="FIt-sy-fp4"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="top" secondItem="chq-bd-6sQ" secondAttribute="bottom" constant="32" id="I92-Z4-DAA"/>
<constraint firstItem="5Zl-ot-dVW" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="LX6-0I-g2t"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="Lpn-U1-2EJ"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="top" secondItem="Y1I-OE-6t1" secondAttribute="bottom" constant="5" id="O7c-yh-TU1"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="Po4-UD-7zT"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="top" secondItem="RIl-8E-GcR" secondAttribute="bottom" constant="16" id="PoW-PW-M0w"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" constant="-1" id="RNt-vj-zPW"/>
<constraint firstItem="5Zl-ot-dVW" firstAttribute="top" secondItem="F5p-cf-frr" secondAttribute="bottom" constant="51" id="TfU-BV-iUe"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="32" id="Ux4-8Q-gMv"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="V04-2u-unZ"/>
<constraint firstItem="mxE-Tx-0Us" firstAttribute="leading" secondItem="5Zl-ot-dVW" secondAttribute="trailing" constant="20.5" id="VOs-rR-tew"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="WN4-SB-6Dy"/>
<constraint firstItem="mxE-Tx-0Us" firstAttribute="trailing" secondItem="8Of-JP-gMR" secondAttribute="trailing" id="aZs-4P-9iv"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="width" secondItem="8Of-JP-gMR" secondAttribute="width" id="asA-dV-Wmj"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="c3z-29-UwW"/>
<constraint firstItem="Qbr-kJ-U7P" firstAttribute="centerY" secondItem="5Zl-ot-dVW" secondAttribute="centerY" id="d9i-fK-2UN"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="top" secondItem="Yiv-h8-4V1" secondAttribute="bottom" constant="4" id="e5U-rz-XHX"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="top" secondItem="8Of-JP-gMR" secondAttribute="bottom" constant="20" id="fJY-wF-KYT"/>
<constraint firstItem="8Of-JP-gMR" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="pOm-hg-pge"/>
<constraint firstItem="Y1I-OE-6t1" firstAttribute="top" secondItem="qzA-vE-CGR" secondAttribute="bottom" constant="29" id="tBz-sj-jET"/>
<constraint firstItem="F5p-cf-frr" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="uNF-sL-Kjk"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="ukd-Wg-7Qy"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>
</document>
@@ -0,0 +1,24 @@
//
// GiGaWebViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger,WebSourceType)
{
WebSourceTypeLoacalHtml,
WebSourceTypeUrlLink
};
@interface GiGaWebViewController : UIViewController
@property (nonatomic,strong) NSString *url;
@property (nonatomic,assign) WebSourceType souceType;
@property (nonatomic,strong) NSString *fileName;
@end
@@ -0,0 +1,122 @@
//
// GiGaWebViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaWebViewController.h"
#import "NJKWebViewProgressView.h"
#import "NJKWebViewProgress.h"
#import "UIView+Toast.h"
@interface GiGaWebViewController ()<UIWebViewDelegate,NJKWebViewProgressDelegate>
{
NJKWebViewProgressView *_progressView;
NJKWebViewProgress *_progressProxy;
}
@property (weak, nonatomic) IBOutlet UIWebView *webview;
@end
@implementation GiGaWebViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
_progressProxy = [[NJKWebViewProgress alloc] init];
_webview.delegate = _progressProxy;
_progressProxy.webViewProxyDelegate = self;
_progressProxy.progressDelegate = self;
CGRect navBounds = self.navigationController.navigationBar.bounds;
CGRect barFrame = CGRectMake(0,
navBounds.size.height - 2,
navBounds.size.width,2);
_progressView = [[NJKWebViewProgressView alloc] initWithFrame:barFrame];
_progressView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
[_progressView setProgress:0 animated:YES];
[self loadWeb];
}
-(void)viewWillAppear:(BOOL)animated{
[self.navigationController.navigationBar addSubview:_progressView];
}
-(void)viewWillDisappear:(BOOL)animated{
[_progressView removeFromSuperview];
}
-(void)loadWeb{
switch (self.souceType) {
case WebSourceTypeUrlLink:
{
if (!self.url) {
[self.view makeToast:@"链接为空" duration:1 position:CSToastPositionCenter];
return;
}
NSURLRequest *req = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:self.url]];
[_webview loadRequest:req];
}
break;
case WebSourceTypeLoacalHtml:
{
if (!self.fileName) {
[self.view makeToast:@"无此文件" duration:1 position:CSToastPositionCenter];
return;
}
NSString *filepath = [[NSBundle mainBundle] pathForResource: self.fileName ofType:@"html"];
NSString *html = [NSString stringWithContentsOfFile:filepath encoding:NSUTF8StringEncoding error:nil];
[_webview loadHTMLString:html baseURL:[NSURL URLWithString:filepath]];
}
break;
default:
break;
}
}
#pragma mark -NJKWebViewProgressDelegate
-(void)webViewProgress:(NJKWebViewProgress *)webViewProgress updateProgress:(float)progress{
[_progressView setProgress:progress animated:YES];
self.title = [_webview stringByEvaluatingJavaScriptFromString:@"document.title"];
NSLog(@"%@",self.title);
}
- (void)webViewDidStartLoad:(UIWebView *)webView{
NSLog(@"startLoad");
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
}
-(void)webViewDidFinishLoad:(UIWebView *)webView{
NSLog(@"finishLoad");
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
}
-(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
NSLog(@"error:%@",error);
[_progressView setProgress:0 animated:NO];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)removeCookies {
NSHTTPCookieStorage *cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage];
NSArray *pcookies = [cookies cookiesForURL:[NSURL URLWithString:self.url]];
for (NSHTTPCookie *cookie in pcookies) {
[cookies deleteCookie:cookie];
}
}
@end
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GiGaWebViewController">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
<outlet property="webview" destination="sjU-k1-sKC" id="ad6-ii-RNW"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sjU-k1-sKC">
<rect key="frame" x="0.0" y="20" width="375" height="627"/>
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</webView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="sjU-k1-sKC" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" id="4TK-3i-ZCu"/>
<constraint firstItem="sjU-k1-sKC" firstAttribute="bottom" secondItem="Q5M-cg-NOt" secondAttribute="bottom" constant="-20" id="7ku-Eb-39H"/>
<constraint firstItem="sjU-k1-sKC" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="RaA-Zb-VXm"/>
<constraint firstAttribute="trailing" secondItem="sjU-k1-sKC" secondAttribute="trailing" id="cjE-bV-s6d"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>
</document>
@@ -0,0 +1,13 @@
//
// PassWordResetVC.h
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PassWordResetVC : UIViewController
@end
@@ -0,0 +1,79 @@
//
// PassWordResetVC.m
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "PassWordResetVC.h"
@interface PassWordResetVC ()
@property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField;
@property (weak, nonatomic) IBOutlet UITextField *codeTextField;
@property (weak, nonatomic) IBOutlet UIButton *codeSendBtn;
@property (weak, nonatomic) IBOutlet UITextField *passNewTextField;
@property (weak, nonatomic) IBOutlet UIButton *confirmBtn;
@end
@implementation PassWordResetVC
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"重置密码";
// Do any additional setup after loading the view from its nib.
[self confirmUI];
}
-(void)confirmUI{
[self.phoneNumberTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKey:@"_placeholderLabel.textColor"];
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:@""];
[phoneView addSubview:phoneIcon];
self.phoneNumberTextField.leftView = phoneView;
self.phoneNumberTextField.leftViewMode = UITextFieldViewModeAlways;
[self.codeTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKey:@"_placeholderLabel.textColor"];
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:@""];
[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:@""];
[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;
}
- (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.
}
*/
@end
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PassWordResetVC">
<connections>
<outlet property="codeSendBtn" destination="Dv2-ja-F8y" id="T0c-bf-ldg"/>
<outlet property="codeTextField" destination="nCj-Hg-8pQ" id="wO0-kR-CDB"/>
<outlet property="confirmBtn" destination="w3j-WU-gmW" id="M1V-lY-rTu"/>
<outlet property="passNewTextField" destination="MHD-nb-UXj" id="saF-ZL-bv8"/>
<outlet property="phoneNumberTextField" destination="gY9-PP-yev" id="M4O-zE-3Md"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<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="117" width="289" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="yoq-8B-w5c"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eTv-jk-ONL">
<rect key="frame" x="43" y="165" width="289" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="dNM-XE-6RY"/>
</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="193" width="289" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="ioe-Op-8gQ"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rno-VM-u1V">
<rect key="frame" x="43" y="241" width="289" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="2Xf-HW-K8d"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rm0-UH-T6r">
<rect key="frame" x="43" y="305" width="289" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="eFI-tx-VRV"/>
</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="257" 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="189" width="94" height="48"/>
<constraints>
<constraint firstAttribute="width" constant="94" id="FpG-3G-Wne"/>
<constraint firstAttribute="height" constant="48" id="LDX-cC-LYa"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<state key="normal" title="发送验证码">
<color key="titleColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</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="363" width="289" height="44"/>
<color key="backgroundColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="rMD-6U-hj0"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="确 认">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
</button>
</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="Q5M-cg-NOt" 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="Q5M-cg-NOt" 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="Q5M-cg-NOt" secondAttribute="leading" constant="43" id="bPv-7M-n3u"/>
<constraint firstItem="rno-VM-u1V" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="bu8-ma-nFV"/>
<constraint firstItem="rm0-UH-T6r" firstAttribute="centerX" secondItem="Q5M-cg-NOt" 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="Q5M-cg-NOt" secondAttribute="centerX" id="j3f-mJ-dgC"/>
<constraint firstItem="gY9-PP-yev" firstAttribute="centerX" secondItem="Q5M-cg-NOt" secondAttribute="centerX" id="nQx-N0-rE4"/>
<constraint firstItem="w3j-WU-gmW" firstAttribute="centerX" secondItem="Q5M-cg-NOt" 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="Q5M-cg-NOt" secondAttribute="centerX" id="sag-zh-3M2"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="33.5" y="53.5"/>
</view>
</objects>
</document>
@@ -0,0 +1,13 @@
//
// GiGaAppGaurdVC.h
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GiGaAppGaurdVC : UIViewController
@end
@@ -0,0 +1,71 @@
//
// GiGaAppGaurdVC.m
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaAppGaurdVC.h"
#import "Masonry.h"
#import "GiGaUserDefault.h"
@interface GiGaAppGaurdVC ()
@end
@implementation GiGaAppGaurdVC
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor lightGrayColor];
[GiGaUserDefault saveAppGaurdflag:YES];
[self creatUI];
}
-(void)creatUI{
UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
[dismisBtn setTitle:@"立即体验" forState:UIControlStateNormal];
dismisBtn.backgroundColor = [UIColor greenColor];
[dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:dismisBtn];
[dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(200);
make.height.mas_equalTo(30);
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;
}
-(void)dismisBtnAction{
[self dismissViewControllerAnimated:YES completion:^{
NC_POST_NAME_OBJECT(APP_GUARD_DISSMISS, nil);
}];
}
- (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.
}
*/
@end
@@ -0,0 +1,13 @@
//
// GiGaMaskTaskViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/14.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GiGaMaskTaskViewController : UIViewController
@end
@@ -0,0 +1,170 @@
//
// GiGaMaskTaskViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/14.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaMaskTaskViewController.h"
#import "MaskViewBootomWaringView.h"
#import "GiGaUserLoginVC.h"
#import "UserGuardViewController.h"
#import "GiGaUserDefault.h"
#import "GiGaAppGaurdVC.h"
@interface GiGaMaskTaskViewController ()
@property(nonatomic,strong)MaskViewBootomWaringView *waringView;
@end
@implementation GiGaMaskTaskViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self setUpNav];
[self addNotify];
BOOL canshowGaurd = [GiGaUserDefault isShowedGaurd];
if (!canshowGaurd) {
NSLog(@"%d",(int)canshowGaurd );
}
// NSLog(@"%d",(int)canshowGaurd );
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd];
if (!showAppGaurd) {
[self showAPPappGaurdView];
}
}
-(void)addNotify{
NC_ADD_TARGET_NAME_OBJECT(self, @selector(guardViewDissmiss), USER_GUARD_DISSMISS, nil) ;
NC_ADD_TARGET_NAME_OBJECT(self, @selector(appGauardViewDissmiss),APP_GUARD_DISSMISS, nil) ;
}
#pragma mark 新手引导消失
-(void)guardViewDissmiss{
[self showWaringView];
}
#pragma mark app引导页消失
-(void)appGauardViewDissmiss{
//出现新手引导
BOOL isshowGaurd = [GiGaUserDefault isShowedGaurd];
if (!isshowGaurd) {
NSLog(@"%d",(int)isshowGaurd );
[self showUserGaurdView];
}
}
-(void)dealloc{
NC_REMOVE_NAME(self, USER_GUARD_DISSMISS, nil);
NC_REMOVE_NAME(self, APP_GUARD_DISSMISS, nil);
}
#pragma mark 新手引导
-(void)showUserGaurdView{
UserGuardViewController *userGuardVC = [[UserGuardViewController alloc] init];
if (ISIOS8) {
userGuardVC.modalPresentationStyle = UIModalPresentationOverCurrentContext;
}else{
userGuardVC.modalPresentationStyle = UIModalPresentationCurrentContext;
}
userGuardVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
[self presentViewController:userGuardVC animated:NO completion:nil];
}
#pragma mark App引导页
-(void)showAPPappGaurdView{
GiGaAppGaurdVC *gaurdVC = [[GiGaAppGaurdVC alloc] init];
[self presentViewController:gaurdVC animated:YES completion:nil];
}
#pragma mark - setUpNav
-(void)setUpNav{
//leftItem
UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
leftBtn.frame = CGRectMake(0, 0, 40, 40);
leftBtn.backgroundColor = [UIColor redColor];
[leftBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[leftBtn addTarget:self action:@selector(leftBtnAction) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
//rightItem
UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
rightBtn.frame = CGRectMake(0, 0, 40, 40);
rightBtn.backgroundColor = [UIColor blueColor];
[rightBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[rightBtn addTarget:self action:@selector(rightBtnAction) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
}
#pragma mark 消息 action
-(void)leftBtnAction{
GiGaUserLoginVC *userlogInVC= [[GiGaUserLoginVC alloc] init];
GiGaBaseNavViewController *baseNav = [[GiGaBaseNavViewController alloc] initWithRootViewController:userlogInVC];
[self presentViewController:baseNav animated:YES completion:nil];
}
#pragma mark 个人中心 action
-(void)rightBtnAction{
}
#pragma mark -bottomView
-(void)showWaringView{
[UIView animateWithDuration:0.4 animations:^{
self.waringView.frame = CGRectMake(0,self.view.frame.size.height - 60, self.view.frame.size.width, 60);
}];
[self.view addSubview:self.waringView];
weakify(self);
[self.waringView.dismissBtn initWithBlock:^(UIButton *btn) {
NSLog(@"GIGAdismissBtn");
[UIView animateWithDuration:0.4 animations:^{
weakSelf.waringView.frame = CGRectMake(0, self.view.frame.size.height, self.view.frame.size.height, 60);
} completion:^(BOOL finished) {
[weakSelf.waringView removeFromSuperview];
}];
} for:UIControlEventTouchUpInside ];
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[self showWaringView];
}
- (MaskViewBootomWaringView *)waringView{
if (!_waringView) {
self.waringView = [[MaskViewBootomWaringView alloc] initWithFrame: CGRectMake(0, self.view.frame.size.height, self.view.frame.size.height, 60)];
}
return _waringView;
}
- (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.
}
*/
@end
@@ -0,0 +1,14 @@
//
// UserGuardViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UserGuardViewController : UIViewController
@end
@@ -0,0 +1,70 @@
//
// UserGuardViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "UserGuardViewController.h"
#import "Masonry.h"
#import "GiGaUserDefault.h"
@interface UserGuardViewController ()
@end
@implementation UserGuardViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
//self.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
[self creatUI];
}
-(void)creatUI{
UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
[dismisBtn setTitle:@"知道了" forState:UIControlStateNormal];
[dismisBtn setTintColor:[UIColor whiteColor]];
dismisBtn.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
[dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:dismisBtn];
[dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(100);
make.height.mas_equalTo(60);
make.centerX.mas_equalTo(self.view.mas_centerX);
make.top.mas_equalTo(self.view.mas_top).offset(200);
}];
}
-(void)dismisBtnAction{
[GiGaUserDefault saveUsergaurdflag:YES];
[self dismissViewControllerAnimated:NO completion:^{
NC_POST_NAME_OBJECT(USER_GUARD_DISSMISS, nil);
}];
}
- (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.
}
*/
@end
@@ -0,0 +1,15 @@
//
// MaskViewBootomWaringView.h
// GIGA
//
// Created by lianxiang on 2018/8/20.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GiGaBlockButton.h"
@interface MaskViewBootomWaringView : UIView
@property(nonatomic,strong) GiGaBlockButton *dismissBtn;
@end
@@ -0,0 +1,65 @@
//
// MaskViewBootomWaringView.m
// GIGA
//
// Created by lianxiang on 2018/8/20.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "MaskViewBootomWaringView.h"
#import "Masonry.h"
@implementation MaskViewBootomWaringView
-(instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.8];
[self setUpUI];
}
return self;
}
-(void)setUpUI{
UIImageView *iconImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
iconImg.backgroundColor = [UIColor redColor];
[self addSubview:iconImg];
[iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.and.height.mas_equalTo(40);
make.left.mas_equalTo(10);
make.centerY.mas_equalTo(self.mas_centerY);
}];
UILabel *waringLabel = [[UILabel alloc] init];
waringLabel.text = @"亲爱滴,请您务必要开启手机声音哦";
waringLabel.textColor = [UIColor whiteColor];
waringLabel.textAlignment = NSTextAlignmentCenter;
waringLabel.font = [UIFont systemFontOfSize:16];
[waringLabel sizeToFit];
[self addSubview:waringLabel];
[waringLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(iconImg.mas_right).offset(10);
make.centerY.mas_equalTo(self.mas_centerY);
}];
GiGaBlockButton *dismisBtn = [GiGaBlockButton buttonWithType:UIButtonTypeCustom];
[dismisBtn setImage:[UIImage imageNamed:@"maske_dismiss_waring"] forState:UIControlStateNormal];
[dismisBtn setContentMode:UIViewContentModeScaleAspectFill];
self.dismissBtn = dismisBtn;
[self addSubview:dismisBtn];
[dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.mas_right).offset(10);
make.centerY.mas_equalTo(self.mas_centerY);
make.width.and.height.mas_equalTo(40);
}];
}
@end
@@ -0,0 +1,13 @@
//
// GiGaUserViewController.h
// GIGA
//
// Created by lianxiang on 2018/8/13.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GiGaUserViewController : UIViewController
@end
@@ -0,0 +1,37 @@
//
// GiGaUserViewController.m
// GIGA
//
// Created by lianxiang on 2018/8/13.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaUserViewController.h"
@interface GiGaUserViewController ()
@end
@implementation GiGaUserViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (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.
}
*/
@end
+18
View File
@@ -0,0 +1,18 @@
//
// GiGaUser.h
// GIGA
//
// Created by lianxiang on 2018/8/15.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "JSONModel.h"
@interface GiGaUser : JSONModel
@property(nonatomic,copy) NSString *userId;
@property(nonatomic,copy) NSString *name;
@property(nonatomic,copy) NSString *avatar;
@property(nonatomic,copy) NSString *tel;
@end
+13
View File
@@ -0,0 +1,13 @@
//
// GiGaUser.m
// GIGA
//
// Created by lianxiang on 2018/8/15.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaUser.h"
@implementation GiGaUser
@end