add files apis

This commit is contained in:
lianxiang 2018-08-30 18:07:16 +08:00
parent 54e936535f
commit 3efde8e0ea
68 changed files with 1254 additions and 374 deletions

View File

@ -29,7 +29,6 @@
8357ADC52123BEBD000816F2 /* GiGaUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357ADC42123BEBD000816F2 /* GiGaUser.m */; };
8357ADC92123BFCA000816F2 /* GiGaUserManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357ADC82123BFCA000816F2 /* GiGaUserManager.m */; };
8357ADCD2123C091000816F2 /* GiGaNetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357ADCC2123C091000816F2 /* GiGaNetManager.m */; };
8357ADD02123C5F7000816F2 /* GiGaAPIRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357ADCF2123C5F7000816F2 /* GiGaAPIRequest.m */; };
8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357ADD22123C7C6000816F2 /* GiGaAPIResult.m */; };
8357ADD52123F5EC000816F2 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8357ADD42123F5EC000816F2 /* libsqlite3.tbd */; };
8357ADD82124027D000816F2 /* GiGaUserDefault.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357ADD72124027D000816F2 /* GiGaUserDefault.m */; };
@ -59,6 +58,9 @@
8361B4322121832800238FEB /* GiGaBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4312121832800238FEB /* GiGaBaseViewController.m */; };
8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4342121836700238FEB /* GiGaBaseNavViewController.m */; };
8361B4382121847600238FEB /* UINavigationBar+Custom.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B4372121847600238FEB /* UINavigationBar+Custom.m */; };
836EE5D42136454500F0ABB2 /* RegistGetSMSCodeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EE5D32136454500F0ABB2 /* RegistGetSMSCodeRequest.m */; };
836EE5D7213645E300F0ABB2 /* GiGaBaseAPiRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EE5D6213645E300F0ABB2 /* GiGaBaseAPiRequest.m */; };
836EE5DA2136716100F0ABB2 /* NSTimer+Convenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EE5D82136716000F0ABB2 /* NSTimer+Convenience.m */; };
83835BA0212E43BD001480F2 /* GiGaMasssagesVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */; };
83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BA5212E4748001480F2 /* MAssaageCenterCell.m */; };
83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83835BA6212E4748001480F2 /* MAssaageCenterCell.xib */; };
@ -79,6 +81,7 @@
838388D3212FB7D700D14C53 /* JXTAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = 838388CE212FB7D700D14C53 /* JXTAlertController.m */; };
838388D4212FB7D700D14C53 /* JXTAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 838388D2212FB7D700D14C53 /* JXTAlertView.m */; };
838388DA2130046D00D14C53 /* emojizone.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 838388D92130046D00D14C53 /* emojizone.mp4 */; };
838500DC2137F3F7003514A3 /* GiGaAttributedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 838500DB2137F3F7003514A3 /* GiGaAttributedLabel.m */; };
83928FFA2134D8F60077D2E8 /* GiGaFlyingCommitInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83928FF92134D8F60077D2E8 /* GiGaFlyingCommitInputView.m */; };
83928FFE2134F37D0077D2E8 /* GiGaSocketRocketUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 83928FFD2134F37D0077D2E8 /* GiGaSocketRocketUtility.m */; };
839290052134F4240077D2E8 /* LXDanMuTrackView.m in Sources */ = {isa = PBXBuildFile; fileRef = 839290002134F4230077D2E8 /* LXDanMuTrackView.m */; };
@ -151,8 +154,6 @@
8357ADC82123BFCA000816F2 /* GiGaUserManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaUserManager.m; sourceTree = "<group>"; };
8357ADCB2123C091000816F2 /* GiGaNetManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaNetManager.h; sourceTree = "<group>"; };
8357ADCC2123C091000816F2 /* GiGaNetManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaNetManager.m; sourceTree = "<group>"; };
8357ADCE2123C5F7000816F2 /* GiGaAPIRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaAPIRequest.h; sourceTree = "<group>"; };
8357ADCF2123C5F7000816F2 /* GiGaAPIRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaAPIRequest.m; sourceTree = "<group>"; };
8357ADD12123C7C6000816F2 /* GiGaAPIResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaAPIResult.h; sourceTree = "<group>"; };
8357ADD22123C7C6000816F2 /* GiGaAPIResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaAPIResult.m; sourceTree = "<group>"; };
8357ADD42123F5EC000816F2 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
@ -202,6 +203,12 @@
8361B4342121836700238FEB /* GiGaBaseNavViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaBaseNavViewController.m; sourceTree = "<group>"; };
8361B4362121847600238FEB /* UINavigationBar+Custom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UINavigationBar+Custom.h"; sourceTree = "<group>"; };
8361B4372121847600238FEB /* UINavigationBar+Custom.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UINavigationBar+Custom.m"; sourceTree = "<group>"; };
836EE5D22136454500F0ABB2 /* RegistGetSMSCodeRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegistGetSMSCodeRequest.h; sourceTree = "<group>"; };
836EE5D32136454500F0ABB2 /* RegistGetSMSCodeRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RegistGetSMSCodeRequest.m; sourceTree = "<group>"; };
836EE5D5213645E300F0ABB2 /* GiGaBaseAPiRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaBaseAPiRequest.h; sourceTree = "<group>"; };
836EE5D6213645E300F0ABB2 /* GiGaBaseAPiRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaBaseAPiRequest.m; sourceTree = "<group>"; };
836EE5D82136716000F0ABB2 /* NSTimer+Convenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSTimer+Convenience.m"; sourceTree = "<group>"; };
836EE5D92136716000F0ABB2 /* NSTimer+Convenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTimer+Convenience.h"; sourceTree = "<group>"; };
83835B9E212E43BD001480F2 /* GiGaMasssagesVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMasssagesVC.h; sourceTree = "<group>"; };
83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMasssagesVC.m; sourceTree = "<group>"; };
83835BA4212E4748001480F2 /* MAssaageCenterCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MAssaageCenterCell.h; sourceTree = "<group>"; };
@ -238,6 +245,8 @@
838388D1212FB7D700D14C53 /* JXTAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JXTAlertView.h; sourceTree = "<group>"; };
838388D2212FB7D700D14C53 /* JXTAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JXTAlertView.m; sourceTree = "<group>"; };
838388D92130046D00D14C53 /* emojizone.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = emojizone.mp4; sourceTree = "<group>"; };
838500DA2137F3F7003514A3 /* GiGaAttributedLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaAttributedLabel.h; sourceTree = "<group>"; };
838500DB2137F3F7003514A3 /* GiGaAttributedLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaAttributedLabel.m; sourceTree = "<group>"; };
83928FF82134D8F60077D2E8 /* GiGaFlyingCommitInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaFlyingCommitInputView.h; sourceTree = "<group>"; };
83928FF92134D8F60077D2E8 /* GiGaFlyingCommitInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaFlyingCommitInputView.m; sourceTree = "<group>"; };
83928FFC2134F37D0077D2E8 /* GiGaSocketRocketUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiGaSocketRocketUtility.h; sourceTree = "<group>"; };
@ -419,12 +428,12 @@
children = (
8357ADCB2123C091000816F2 /* GiGaNetManager.h */,
8357ADCC2123C091000816F2 /* GiGaNetManager.m */,
8357ADCE2123C5F7000816F2 /* GiGaAPIRequest.h */,
8357ADCF2123C5F7000816F2 /* GiGaAPIRequest.m */,
8357ADD12123C7C6000816F2 /* GiGaAPIResult.h */,
8357ADD22123C7C6000816F2 /* GiGaAPIResult.m */,
8314D20F2133ABE500B458BF /* WeiIXinApiManager.h */,
8314D2102133ABE500B458BF /* WeiIXinApiManager.m */,
836EE5D5213645E300F0ABB2 /* GiGaBaseAPiRequest.h */,
836EE5D6213645E300F0ABB2 /* GiGaBaseAPiRequest.m */,
);
path = GiGaNetTool;
sourceTree = "<group>";
@ -529,6 +538,8 @@
8361B3FE21215C8A00238FEB /* Category */ = {
isa = PBXGroup;
children = (
836EE5D92136716000F0ABB2 /* NSTimer+Convenience.h */,
836EE5D82136716000F0ABB2 /* NSTimer+Convenience.m */,
83A22711212A9EA900B3E75C /* UIView+Sizes.h */,
83A22710212A9EA900B3E75C /* UIView+Sizes.m */,
8361B4362121847600238FEB /* UINavigationBar+Custom.h */,
@ -537,6 +548,8 @@
83A22717212ABDFF00B3E75C /* GiGaBlockButton.m */,
83835BCB212E856A001480F2 /* NSString+MD5.h */,
83835BCC212E856A001480F2 /* NSString+MD5.m */,
838500DA2137F3F7003514A3 /* GiGaAttributedLabel.h */,
838500DB2137F3F7003514A3 /* GiGaAttributedLabel.m */,
);
path = Category;
sourceTree = "<group>";
@ -644,6 +657,15 @@
path = BaseVC;
sourceTree = "<group>";
};
836EE5D121363C9A00F0ABB2 /* APi */ = {
isa = PBXGroup;
children = (
836EE5D22136454500F0ABB2 /* RegistGetSMSCodeRequest.h */,
836EE5D32136454500F0ABB2 /* RegistGetSMSCodeRequest.m */,
);
path = APi;
sourceTree = "<group>";
};
83835B9D212E4335001480F2 /* MessageCenter */ = {
isa = PBXGroup;
children = (
@ -831,6 +853,7 @@
83E40B2C21218B7E008149C4 /* LogIn */ = {
isa = PBXGroup;
children = (
836EE5D121363C9A00F0ABB2 /* APi */,
83A2271B212AC81800B3E75C /* Controller */,
83A2271A212AC80D00B3E75C /* Model */,
83A22719212AC7FC00B3E75C /* View */,
@ -1089,6 +1112,7 @@
83346AC5212BBC8C0054D597 /* GiGaRegistViewController.m in Sources */,
83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */,
8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */,
838500DC2137F3F7003514A3 /* GiGaAttributedLabel.m in Sources */,
8314D2112133ABE500B458BF /* WeiIXinApiManager.m in Sources */,
83835BCA212E8045001480F2 /* GIGAQuetionView.m in Sources */,
8361B3CE212155C200238FEB /* ViewController.m in Sources */,
@ -1110,7 +1134,7 @@
83928FFA2134D8F60077D2E8 /* GiGaFlyingCommitInputView.m in Sources */,
838388D3212FB7D700D14C53 /* JXTAlertController.m in Sources */,
833DA7762122A62000A5C614 /* GiGaMaskTaskViewController.m in Sources */,
8357ADD02123C5F7000816F2 /* GiGaAPIRequest.m in Sources */,
836EE5D7213645E300F0ABB2 /* GiGaBaseAPiRequest.m in Sources */,
83835BD0212E8B9C001480F2 /* GiGaQuestionModel.m in Sources */,
83835BAF212E4FCD001480F2 /* MessageListViewCell.m in Sources */,
8361B3D9212155C300238FEB /* main.m in Sources */,
@ -1135,7 +1159,9 @@
835060A5212D3536007E6220 /* AppDelegate+GiGaConfig.m in Sources */,
83E40B2B21218B6F008149C4 /* GiGaExercisesViewController.m in Sources */,
83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */,
836EE5D42136454500F0ABB2 /* RegistGetSMSCodeRequest.m in Sources */,
8361B42E2121812000238FEB /* GiGaServerConfig.m in Sources */,
836EE5DA2136716100F0ABB2 /* NSTimer+Convenience.m in Sources */,
83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */,
839290092134F4C40077D2E8 /* GiGaFlingCommitVC.m in Sources */,
83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */,

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "btn_back@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "btn_back@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "btn_load@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "btn_load@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "btn_moment_back@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "btn_moment_back@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "btn_tab_desplay@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "btn_tab_desplay@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "btn_tab_notselect@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "btn_tab_notselect@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "btn_wechat@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "btn_wechat@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_number@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_number@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_wechat@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_wechat@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.2 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_key@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "icon_key@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.2 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "img_circle_avatar@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "img_circle_avatar@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,5 +1,9 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "exerc_answer_option_nor@2x.png",

View File

@ -1,5 +1,9 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "exerc_answer_option_sel@2x.png",

View File

@ -0,0 +1,19 @@
//
// GiGaAttributedLabel.h
// GIGA
//
// Created by lianxiang on 2018/8/30.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <TTTAttributedLabel/TTTAttributedLabel.h>
#ifndef IB_DESIGNABLE
#define IB_DESIGNABLE
#endif
@class TTTAttributedLabel;
IB_DESIGNABLE @interface GiGaAttributedLabel : TTTAttributedLabel{
}
@end

View File

@ -0,0 +1,21 @@
//
// GiGaAttributedLabel.m
// GIGA
//
// Created by lianxiang on 2018/8/30.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaAttributedLabel.h"
@implementation GiGaAttributedLabel
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end

View File

@ -0,0 +1,50 @@
//
// NSTimer+Convenience.h
// ISCTest
//
// Created by imac on 16/3/23.
// Copyright © 2016年 xiang. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSTimer (Convenience)
typedef void (^LXVoidBlock)(void);
/**
* Timer---Block版本
*
* @param interval interval秒就回调一次callback
* @param repeats
* @param callback block
*
* @return NSTimer对象
*/
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)interval
repeats:(BOOL)repeats
callback:(LXVoidBlock)callback;
/**
* Timer---Block版本
*
* @param interval interval秒就回调一次callback
* @param count count <= 0
* @param callback block
*
* @return NSTimer对象
*/
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)interval
count:(NSInteger)count
callback:(LXVoidBlock)callback;
/**
*
*/
- (void)fireTimer;
/**
*
*/
- (void)unfireTimer;
@end

View File

@ -0,0 +1,78 @@
//
// NSTimer+Convenience.m
// ISCTest
//
// Created by imac on 16/3/23.
// Copyright © 2016 xiang. All rights reserved.
//
#import "NSTimer+Convenience.h"
@implementation NSTimer (Convenience)
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)interval
repeats:(BOOL)repeats
callback:(LXVoidBlock)callback {
return [NSTimer scheduledTimerWithTimeInterval:interval
target:self
selector:@selector(onTimerUpdateBlock:)
userInfo:[callback copy]
repeats:repeats];
}
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)interval
count:(NSInteger)count
callback:(LXVoidBlock)callback {
NSDictionary *userInfo = @{@"callback" : [callback copy],
@"count" : @(count)};
return [NSTimer scheduledTimerWithTimeInterval:interval
target:self
selector:@selector(onTimerUpdateCountBlock:)
userInfo:userInfo
repeats:YES];
}
+ (void)onTimerUpdateBlock:(NSTimer *)timer {
LXVoidBlock block = timer.userInfo;
if (block) {
block();
}
}
+ (void)onTimerUpdateCountBlock:(NSTimer *)timer {
static NSUInteger currentCount = 0;
NSDictionary *userInfo = timer.userInfo;
LXVoidBlock callback = userInfo[@"callback"];
NSNumber *count = userInfo[@"count"];
if (count.integerValue <= 0) {
if (callback) {
callback();
}
} else {
if (currentCount < count.integerValue) {
currentCount++;
if (callback) {
callback();
}
} else {
currentCount = 0;
[timer unfireTimer];
[timer invalidate];
timer = nil;
}
}
}
- (void)fireTimer {
[self setFireDate:[NSDate distantPast]];
}
- (void)unfireTimer {
[self setFireDate:[NSDate distantFuture]];
}
@end

View File

@ -56,8 +56,8 @@ 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];
}

View File

@ -36,12 +36,13 @@
if (self.viewControllers.count > 1 ) {
//
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[backBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
backBtn.backgroundColor = [UIColor redColor];
backBtn.frame = CGRectMake(0, 0, 40, 40);
[backBtn setImage:[UIImage imageNamed:@"btn_moment_back"] forState:UIControlStateNormal];
[backBtn setImageEdgeInsets:UIEdgeInsetsMake(0,-14, 0, 14)];
//backBtn.backgroundColor = [UIColor redColor];
[backBtn addTarget:self action:@selector(backItemAction) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
viewController.navigationItem.leftBarButtonItem = backItem;
}
}
@ -55,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

View File

@ -28,7 +28,7 @@
[super viewDidLoad];
// Do any additional setup after loading the view.
[self.view addSubview:_tableView];
[self testNetworkStatus];
//[self testNetworkStatus];
}
-(void)addNavTitile:(NSString *)title{

View File

@ -36,12 +36,12 @@
NSURL *imageUrl = [[NSBundle mainBundle] URLForResource:@"MaskTime" withExtension:@"png"];
UNNotificationAttachment *attach = [UNNotificationAttachment attachmentWithIdentifier:@"photo" URL:imageUrl options:nil error:nil];
NSURL *audioUrl = [[NSBundle mainBundle] URLForResource:@"4481" withExtension:@"wav"];
UNNotificationAttachment *attachAudio = [UNNotificationAttachment attachmentWithIdentifier:@"audio" URL:audioUrl options:nil error:nil];
// NSURL *audioUrl = [[NSBundle mainBundle] URLForResource:@"4481" withExtension:@"wav"];
// UNNotificationAttachment *attachAudio = [UNNotificationAttachment attachmentWithIdentifier:@"audio" URL:audioUrl options:nil error:nil];
NSURL *vedioUrl = [[NSBundle mainBundle] URLForResource:@"emojizone" withExtension:@"mp4"];
UNNotificationAttachment *vedioAudio = [UNNotificationAttachment attachmentWithIdentifier:@"vedio" URL:vedioUrl options:nil error:nil];
content.attachments = @[attachAudio];
// NSURL *vedioUrl = [[NSBundle mainBundle] URLForResource:@"emojizone" withExtension:@"mp4"];
// UNNotificationAttachment *vedioAudio = [UNNotificationAttachment attachmentWithIdentifier:@"vedio" URL:vedioUrl options:nil error:nil];
content.attachments = @[attach];
// 60s
UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:timeInterval repeats:NO];

View File

@ -1,71 +0,0 @@
//
// GiGaAPIRequest.h
// GIGA
//
// Created by lianxiang on 2018/8/15.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "GiGaAPIResult.h"
@class GiGaAPIRequest;
#define DEFALUT_APIREQUEST_TIMEOUT 20
typedef enum GiGaRequestType {
kRequestTypeGet,
kRequestTypePost,
kRequestTypeUpload,
kRequestTypeMultiUpload
}GiGaRequestTyp;
typedef enum ApiResultFormat {
kApiResultJson,
kApiResultXml,
}ApiResultFormat;
@protocol GiGaApiRquestDelegate<NSObject>
@optional
- (void)serverApiFinishedSuccessed:(GiGaAPIRequest *)api result:(GiGaAPIResult *)result;
- (void)serverApiRequestFailed:(GiGaAPIRequest *)api error:(NSError *)error;
- (void)serverApiFinishedFailed:(GiGaAPIRequest *)api result:(GiGaAPIResult *)result;
@end
@interface GiGaAPIRequest : NSObject
#pragma mark - porperty
/** 请求类型 */
@property (nonatomic, readonly) GiGaRequestTyp requestType;
/** 请求返回的格式 */
@property (nonatomic, readonly) ApiResultFormat resultFormat;
/** 请求超时时间 */
@property (nonatomic, readonly) NSTimeInterval timeout;
/** 服务器地址 */
@property (nonatomic, readonly) NSString *serviceUrl;
/** 请求路径 */
@property (nonatomic, readonly) NSString *fullUrl;
/** 代理 */
@property (nonatomic, weak) id<GiGaApiRquestDelegate> delegate;
/** 请求参数数组 */
@property (nonatomic, strong) NSMutableArray *params;
#pragma mark - Method
- (id)initWithDelegate:(id<GiGaApiRquestDelegate>)delegate;
/**
*
*/
- (void)appendBaseParams;
#pragma mark - APIRequestDelegate
/**
*
*/
- (void)callBackFinishedWithDictionary:(NSDictionary *)dic;
/**
*
*/
- (void)callBackFailed:(NSError *)error;
@end

View File

@ -1,81 +0,0 @@
//
// GiGaAPIRequest.m
// GIGA
//
// Created by lianxiang on 2018/8/15.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaAPIRequest.h"
#import "GiGaServerConfig.h"
@implementation GiGaAPIRequest
- (id)initWithDelegate:(id<GiGaApiRquestDelegate>)delegate
{
if (self = [super init]) {
self.params = [NSMutableArray array];
self.delegate = delegate;
}
return self;
}
//Get访
- (GiGaRequestTyp)requestType
{
return kRequestTypeGet;
}
//
- (NSTimeInterval)timeout
{
return DEFALUT_APIREQUEST_TIMEOUT;
}
//
-(NSString *)serviceUrl{
return [GiGaServerConfig getMainUrl];
}
/** */
//
- (NSString *)fullUrl
{
//
NSString *url = [NSString stringWithFormat:@"%@",self.serviceUrl];
return url;
}
//
- (void)callBackFinishedWithDictionary:(NSDictionary *)dic
{
// responseObject
GiGaAPIResult *resu = [[GiGaAPIResult alloc] initWithDictionary:dic];
// error ID = 0
if (resu.success) {
if (self.delegate && [self.delegate respondsToSelector:@selector(serverApiFinishedSuccessed: result:)]) {
//
[self.delegate serverApiFinishedSuccessed:self result:resu];
}
// error ID = 1
} else {
if (self.delegate && [self.delegate respondsToSelector:@selector(serverApiFinishedFailed:result:)]) {
[self.delegate serverApiFinishedFailed:self result:resu];
}
}
}
//
- (void)callBackFailed:(NSError *)error
{
if (self.delegate && [self.delegate respondsToSelector:@selector(serverApiRequestFailed:error:)]) {
[self.delegate serverApiRequestFailed:self error:error];
}
}
//
- (void)appendBaseParams
{
}
@end

View File

@ -12,8 +12,8 @@
/** 提示信息 */
@property (nonatomic, copy) NSString *message;
/** 请求状态 */
@property (nonatomic, assign) NSInteger status;
/** 状态 */
@property (nonatomic, assign) NSInteger code;
/** 请求是否成功 */
@property (nonatomic, readonly) BOOL success;
/** 接收数据的字典 */

View File

@ -12,7 +12,7 @@
-(BOOL)success{
return self.status == 0;
return self.code == 0? YES : NO;
}
@ -21,21 +21,21 @@
if (self = [super init]) {
@try {
if (dic && ![dic isKindOfClass:[NSNull class]]) {
self.status = [[dic objectForKey:@"errorcode"] intValue];//
self.message = [dic objectForKey:@""];//
self.code = [[dic objectForKey:@"code"] integerValue];
self.message = [dic objectForKey:@"msg"];
NSDictionary *data = [[dic objectForKey:@"result"] objectForKey:@"data"];
self.dic = data;
}else{
self.message = @"网络错误";
self.message = @"请求异常";
self.dic = nil;
self.status = 1;
self.code = -1;
}
}
@catch(NSException *exception) {
self.dic = dic;
self.status = 0;
self.code = -1;
}
@finally {

View File

@ -0,0 +1,134 @@
//
// GiGaBaseAPiRequest.h
// GIGA
//
// Created by lianxiang on 2018/8/29.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "GiGaAPIResult.h"
typedef NS_ENUM(NSInteger, GIGARequestStatus) {
NotAvailable = 1, //不可用
RequestSuccess = 2, //请求成功
RequestFailed = 4, //请求失败
RequestLocalData = 8, //本地请求
RequestNoMoreContent = 16, //没有更多数据
};
typedef NS_ENUM(NSInteger, GIGARequestNetStatus) {
NetStatusWifi = 1,
NetStatusWWAN = 2,
NetStatusUnKown= 4,//不可用
};
typedef NS_ENUM(NSInteger, RequestMethod) {
RequestPostMethod = 1, //post 请求
RequestGetMethod = 2, //get 请求
RequestPutMethod = 3, //put 请求
RequestDelMethod = 4, //del 请求
};
typedef NS_ENUM(NSInteger ,GiGAErrorCode){
GiGAErrorCode_SUCCESS = 0,//成功
GiGAErrorCode_USER_EXIST = 500,//用户已存在
};
@class GiGaBaseAPiRequest;
typedef void (^GiGaRequestResultBlock)(GiGaAPIResult *result);
@interface GiGaBaseAPiRequest : NSObject
#pragma mark - porperty
@property (nonatomic,assign) GIGARequestNetStatus statu;
//@property (nonatomic, copy) GIGARequestSuccessBlock successBlock;
//@property (nonatomic, copy) GIGARequetFailBlock failBlock;
@property (nonatomic,copy) GiGaRequestResultBlock blockresult;
/** 请求类型 */
@property (nonatomic, assign) RequestMethod requestMethod;
/** 请求超时时间 */
@property (nonatomic, readonly) NSTimeInterval timeout;
/** 服务器地址 */
@property (nonatomic, readonly) NSString *serviceUrl;
/** 请求路径 */
@property (nonatomic, copy) NSString *fullUrl;
/** 请求参数 */
@property (nonatomic, strong) NSMutableDictionary *params;
/**
*
*/
@property (strong, nonatomic) NSDictionary *resultDict;
@property (strong, nonatomic) NSDictionary *responseHeaderFields;
@property (nonatomic, assign) BOOL needToken; // 是否需要带上token
/**
*
*/
- (void)checkNetwork;
/**
@param result
*/
- (void)requstDataWithResult:(GiGaRequestResultBlock)result;
/**
*
*
* @param success block
* @param failure block
*/
//- (void)loadLocalDataAsyncWithSuccess:(GIGARequestSuccessBlock)success
// failure:(GIGARequetFailBlock)failure;
/**
*
*
* @param requestDict
* @param error error信息
*/
- (void)analyseResponseInfo:(NSDictionary *)requestDict error:(NSError *)error;
- (void)analyseResponseInfo:(NSDictionary *)requestDict
headerFileds:(NSDictionary *)headerFields
error:(NSError *)error;
/**
API convenience constructor
@param path request path
@param method method
@param parms parms
@return model
*/
+ (instancetype)initWithRequestPath:(NSString *)path
method:(RequestMethod)method
parms:(NSDictionary *)parms;
+ (instancetype)initWithRequestAbsoluteURLString:(NSString *)absoluteString
method:(RequestMethod)method
parms:(NSDictionary *)parms;
//+ (instancetype)uploadImage:(NSString *)url
// imgData:(NSData *)imgData
// parms:(NSDictionary *)parms
// success:(GIGARequestSuccessBlock)success
// failure:(GIGARequetFailBlock)failure;
//+ (NSString *)resizeImageUrl:(NSString *)originImageUrl
// size:(CGSize)size;
@end

View File

@ -0,0 +1,163 @@
//
// GiGaBaseAPiRequest.m
// GIGA
//
// Created by lianxiang on 2018/8/29.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "GiGaBaseAPiRequest.h"
#import "GiGaServerConfig.h"
#import <JSONModel/JSONModel.h>
#import "GiGaNetManager.h"
@implementation GiGaBaseAPiRequest
- (NSString *)serviceUrl
{
return [GiGaServerConfig getMainUrl];
}
- (id)init
{
self = [super init];
if (self) {
_needToken = NO;
self.requestMethod = RequestGetMethod;
}
return self;
}
+(instancetype)initWithRequestPath:(NSString *)path method:(RequestMethod)method parms:(NSDictionary *)parms
{
NSString *absoluteURLString = [NSString stringWithFormat:@"%@%@", [GiGaServerConfig getMainUrl], path];
return [self initWithRequestAbsoluteURLString:absoluteURLString
method:method
parms:parms];
}
+ (instancetype)initWithRequestAbsoluteURLString:(NSString *)absoluteString
method:(RequestMethod)method
parms:(NSDictionary *)parms
{
GiGaBaseAPiRequest *request = [[self alloc] init];
request.fullUrl = absoluteString;
request.requestMethod = method;
[request buildRequestDictWithDepedency:parms];
return request;
}
+ (NSArray *)mergeOriginalArray:(NSArray *)orgArr withOtherArray:(NSArray *)otherArr;
{
if (otherArr.count == 0) {
return orgArr;
}
NSMutableArray *array = [NSMutableArray arrayWithArray:orgArr];
for (int i = 0; i < otherArr.count; i++) {
id object = [otherArr objectAtIndex:i];
if (!orgArr || [orgArr indexOfObject:object] == NSNotFound) {
[array addObject:object];
}
}
return array;
}
- (NSMutableDictionary *)buildRequestDict
{
if (!_params) {
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
_params = dict;
}
return _params;
}
- (NSMutableDictionary *)buildRequestDictWithDepedency:(NSDictionary *)dict
{
self.params = dict.mutableCopy;
return self.params;
}
- (void)requstDataWithResult:(GiGaRequestResultBlock)result
{
self.blockresult = result;
[self checkNetwork];
if (self.statu == NetStatusUnKown) {
return;
}
NSLog(@" %@", _fullUrl);
// NSMutableDictionary *postDict = [self buildRequestDict];
[GiGaNetManager requestMethod:self.requestMethod Url:self.fullUrl params:self.params responseBlock:^(NSDictionary *responseDict, NSDictionary *responseHeaderFields, NSError *error) {
[self analyseResponseInfo:responseDict headerFileds:responseHeaderFields error:error];
}];
}
- (void)analyseResponseInfo:(NSDictionary *)responseData error:(NSError *)error
{
[self analyseResponseInfo:responseData
headerFileds:nil
error:error];
}
- (void)analyseResponseInfo:(NSDictionary *)responseData headerFileds:(NSDictionary *)headerFields error:(NSError *)error
{
self.responseHeaderFields = headerFields;
NSString *token = headerFields[@"access-token"];
if (token && token.length > 0) {
//token
//[FFBMSConfig shareInstance].token = token;
}
GILog(@"headerFileds%@",headerFields);
if (error) {
GILog(@"err:%@",error.localizedDescription);
[[UIApplication sharedApplication].keyWindow makeToast:@"请求错误" duration:1 position:CSToastPositionCenter];
self.blockresult(nil);
return;
}
self.resultDict =responseData;
GiGaAPIResult *res = [[GiGaAPIResult alloc] initWithDictionary:responseData];
if (self.blockresult) {
self.blockresult(res);
}
}
- (void)checkNetwork{
AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager sharedManager];
[manager startMonitoring];
[manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
switch (status) {
case AFNetworkReachabilityStatusReachableViaWWAN:
{
GILog(@"2/3/4G");
self.statu = NetStatusWWAN;
}
break;
case AFNetworkReachabilityStatusReachableViaWiFi:
{
GILog(@"WiFi");
self.statu = NetStatusWifi;
}
break;
default:
[[UIApplication sharedApplication].keyWindow makeToast:@"网络异常" duration:1.0 position:CSToastPositionCenter];
self.statu = NetStatusUnKown;
GILog(@"Unkown Net");
break;
}
}];
}
@end

View File

@ -7,11 +7,18 @@
//
#import <Foundation/Foundation.h>
#import "GiGaAPIRequest.h"
@interface GiGaNetManager : NSObject
+(GiGaNetManager *)shareInstance;
+(void)request:(GiGaAPIRequest*)api;
#import "GiGaBaseAPiRequest.h"
typedef void (^responseBlock)(NSDictionary *responseDict, NSDictionary *responseHeaderFields, NSError *error);
@interface GiGaNetManager : NSObject
+ (void)requestMethod:(RequestMethod)requestMethod Url:(NSString *)url params:(NSDictionary *)params responseBlock:(responseBlock)block;
+(void)request:(NSString *)url params:(NSDictionary *)param
success:(void (^)(id response))success
failure:(void (^)(NSError *err))failure;
+(void)userLoginrequest:(NSString *)url params:(NSDictionary *)param completionHandler:(nullable void (^)(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error))completionHandler;
@end

View File

@ -9,54 +9,58 @@
#import "GiGaNetManager.h"
#import "AFNetworking.h"
#import "GiGaServerConfig.h"
@interface GiGaNetManager()
@end
@implementation GiGaNetManager
+ (GiGaNetManager *)shareInstance{
static GiGaNetManager *instance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[self alloc] init];
});
return instance;
}
+ (void)request:(GiGaAPIRequest *)api{
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
NSURL *baseUrl = [NSURL URLWithString:[GiGaServerConfig getMainUrl]];
AFHTTPSessionManager*manager=[[AFHTTPSessionManager alloc] initWithBaseURL:baseUrl sessionConfiguration:configuration];
+ (void)requestMethod:(RequestMethod)requestMethod Url:(NSString *)url params:(NSDictionary *)params responseBlock:(responseBlock)block{
// NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
// NSURL *baseUrl = [NSURL URLWithString:[GiGaServerConfig getMainUrl]];
// AFHTTPSessionManager*manager=[[AFHTTPSessionManager alloc] initWithBaseURL:baseUrl sessionConfiguration:configuration];
AFHTTPSessionManager*manager=[[AFHTTPSessionManager alloc] init];
manager.responseSerializer=[AFHTTPResponseSerializer serializer];
switch (api.requestType) {
case kRequestTypeGet:
switch (requestMethod) {
case RequestGetMethod:
{
[manager GET:api.fullUrl parameters:api.params progress:^(NSProgress * _Nonnull downloadProgress) {
[manager GET:url parameters:params progress:^(NSProgress * _Nonnull downloadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary *outDic = (NSDictionary *)responseObject;
[api callBackFinishedWithDictionary:outDic];
NSLog(@"%@", responseObject);
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
block(dict, headerFields, nil);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
[api callBackFailed:error];
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
block(nil, headerFields, error);
}];
}
break;
case kRequestTypePost:
case RequestPostMethod:
{
[manager POST:api.fullUrl parameters:api.params progress:^(NSProgress * _Nonnull uploadProgress) {
[manager POST:url parameters:params progress:^(NSProgress * _Nonnull uploadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary *outDic = (NSDictionary *)responseObject;
[api callBackFinishedWithDictionary:outDic];
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
NSLog(@"%@", dict);
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
block(dict, headerFields, nil);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
[api callBackFailed:error];
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
block(nil, headerFields, error);
}];
}
break;
@ -67,6 +71,58 @@
}
}
+(void)request:(NSString *)url params:(NSDictionary *)param
success:(void (^)(id response))success
failure:(void (^)(NSError *err))failure
{
AFHTTPSessionManager*manager=[[AFHTTPSessionManager alloc] init];
manager.responseSerializer=[AFHTTPResponseSerializer serializer];
[manager POST:url parameters:param progress:^(NSProgress * _Nonnull uploadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
NSLog(@"%@", dict);
if (success) {
success(responseObject);
}
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"%@",error);
if (failure) {
failure(error);
}
}];
}
//body
+(void)userLoginrequest:(NSString *)url params:(NSDictionary *)param completionHandler:(nullable void (^)(NSURLResponse *response,NSDictionary *resDic, NSError * _Nullable error))completionHandler
{
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
NSURL *baseUrl = [NSURL URLWithString:[GiGaServerConfig getMainUrl]];
AFHTTPSessionManager*manager=[[AFHTTPSessionManager alloc] initWithBaseURL:baseUrl sessionConfiguration:configuration];
NSMutableURLRequest *requst = [[AFJSONRequestSerializer serializer]
requestWithMethod:@"POST" URLString:url parameters:param error:nil];
requst.timeoutInterval = 10.f;
[requst setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[requst setValue:@"application/json" forHTTPHeaderField:@"Accept"];
NSURLSessionDataTask *task = [manager dataTaskWithRequest:requst uploadProgress:^(NSProgress * _Nonnull uploadProgress) {
} downloadProgress:^(NSProgress * _Nonnull downloadProgress) {
} completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
if (completionHandler) {
completionHandler(response,responseObject,error);
}
}];
[task resume];
}
@end

View File

@ -12,8 +12,10 @@
@interface GiGaUserDefault : NSObject
//
+(void)saveUserId:(NSString *)userId;
+(void)saveToken:(NSString *)token;
+(NSString *)getCurentToken;
+(NSString *)getCurentUserId;
+(void)removeUserId;//退出登录
+(BOOL)isUserLogin;
@ -48,4 +50,5 @@
+(NSDictionary *)getWeiXinAccessToenDic;
@end

View File

@ -13,13 +13,12 @@ NSString *const GIGADEFAULTKEY_USERID = @"GiGaUserId";
NSString *const kShowUserGuard = @"ShowUserGuard";
NSString *const kShowAppGuard = @"ShowAppGuard";
NSString *const kWeiXinSaveToken = @"WeiXinSaveToken";
NSString *const kGiGaToken = @"GiGatoken";
@implementation GiGaUserDefault
+(void)saveUserId:(NSString *)userId{
UD_SET_KEY_VALUE(GIGADEFAULTKEY_USERID, userId);
}
+(NSString*)getCurentUserId{
@ -28,12 +27,24 @@ NSString *const kWeiXinSaveToken = @"WeiXinSaveToken";
return userid;
}
+(void)saveToken:(NSString *)token{
[UD_STADARDUD setObject:token forKey: kGiGaToken];
[UD_STADARDUD synchronize];
}
+(void)removeUserId{
UD_REMOVE_KEY(GIGADEFAULTKEY_USERID);
}
+(NSString *)getCurentToken{
NSString *token = [UD_STADARDUD objectForKey:kGiGaToken];
[UD_STADARDUD synchronize];
return token;
}
+(BOOL)isUserLogin{
NSString *uid = UD_GET_VALUE(GIGADEFAULTKEY_USERID);

View File

@ -41,6 +41,9 @@ UD_SYNC
//app 挂起
#define kLOCALNotifiID_APPTERMINAL @"GIGALocalNotificationAppTerminal"
//注册成功
#define kUserRegistSucccess @"userRegistSuccess"
//微信登陆授权成功
#define kWeiXinAuthrization_Success @"WXAuthSuccess"
#define WXin_APPID @"wx1fa33defa5cbc8dd"
@ -75,5 +78,6 @@ alpha:((float)(rgbValue & 0xFF))/255.0]
#define textFontWeightSize(X,W) [UIFont systemFontOfSize:X *([UIScreen mainScreen].bounds.size.width / 320.0) weight:W]
#define GIGA_ShowToast(__toast__) [self.view makeToast:(__toast__) duration:1.5 position:CSToastPositionCenter];
#define GIGA_WIndowTost(__toast__) [[UIApplication sharedApplication].keyWindow makeToast:(__toast__) duration:1.5 position:CSToastPositionCenter];
#endif /* GIGA_h */

View File

@ -18,7 +18,7 @@
case 0://
{
[[NSUserDefaults standardUserDefaults] setValue:@"https://" forKey:@"MainUrl"];
[[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"];
} break;
case 1: //
{

View File

@ -13,6 +13,7 @@
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
#import "GIGA.h"
#import "AFNetworking.h"
#import <JSONModel/JSONModel.h>
#import "UIView+Toast.h"
#import "JXTAlertManagerHeader.h"
#import "Masonry.h"
@ -20,6 +21,7 @@
#import <UMCommon/UMCommon.h>
#import <UMAnalytics/MobClick.h>
#import "MobClickList.h"
#import "TTTAttributedLabel.h"
#ifdef DEBUG
#define GILog(fmt,...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

View File

@ -4,14 +4,19 @@
<dict>
<key>BuglyAppIDString</key>
<string>8f49773330</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<string>cn</string>
<key>CFBundleDisplayName</key>
<string>MaskTime</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string></string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@ -39,6 +44,10 @@
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>

View File

@ -0,0 +1,13 @@
//
// RegistGetSMSCodeRequest.h
// GIGA
//
// Created by lianxiang on 2018/8/29.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaBaseAPiRequest.h"
@interface RegistGetSMSCodeRequest : GiGaBaseAPiRequest
@end

View File

@ -0,0 +1,13 @@
//
// RegistGetSMSCodeRequest.m
// GIGA
//
// Created by lianxiang on 2018/8/29.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
#import "RegistGetSMSCodeRequest.h"
@implementation RegistGetSMSCodeRequest
@end

View File

@ -9,6 +9,12 @@
#import "GiGaRegistViewController.h"
#import "TTTAttributedLabel.h"
#import "GiGaWebViewController.h"
#import "NSTimer+Convenience.h"
#import "GiGaBaseAPiRequest.h"
#import "GiGaNetManager.h"
#import "MBProgressHUD.h"
#import "GiGaAttributedLabel.h"
@interface GiGaRegistViewController ()<TTTAttributedLabelDelegate>
@property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField;
@property (weak, nonatomic) IBOutlet UITextField *codeTextField;
@ -17,7 +23,9 @@
@property (weak, nonatomic) IBOutlet UIButton *checkBtn;
@property (weak, nonatomic) IBOutlet UIButton *registBtn;
@property (weak, nonatomic) IBOutlet TTTAttributedLabel *useragreementLabel;
@property (weak, nonatomic) IBOutlet GiGaAttributedLabel *useragreementLabel;
@property(nonatomic,strong) NSTimer*timer;
@property(nonatomic) NSInteger time;
@end
@ -26,10 +34,73 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"注册";
_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];
}
-(void)dealloc{
if (_timer) {
[_timer unfireTimer];
[_timer invalidate];
_timer = nil;
}
}
-(void)sendCodeBtnAction:(UIButton *)btn{
if (self.phoneNumberTextField.text == nil) {
GIGA_ShowToast(@"请输入手机号");
return;
}
if (![GiGaHelper isPhoneNumber:self.phoneNumberTextField.text]) {
GIGA_ShowToast(@"请输入正确手机号");
return;
}
btn.userInteractionEnabled = NO;
[self startTimer:btn];
[self sendVerifiCode: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.sendCodeBtn setTitle:@"发送短信" forState:UIControlStateNormal];
[btn setBackgroundColor:GIGAUIColorFromRGBA(0x28b9ff)];
self->_time =60;
btn.userInteractionEnabled = YES;
}
}];
[[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
}
}
#pragma mark
-(void)sendVerifiCode:(UIButton *)btn{
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
NSString *phoneNumber = self.phoneNumberTextField.text;
NSDictionary *param = @{
@"mobile":phoneNumber
};
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:@"msg/sms/v1/sendcode" method:RequestPostMethod parms:param];
[api requstDataWithResult:^(GiGaAPIResult *result) {
[MBProgressHUD hideHUDForView:self.view animated:YES];
GILog(@"短信获取%@",result.message);
btn.userInteractionEnabled = YES;
}];
}
-(void)confirmUI{
@ -79,6 +150,57 @@
webView.souceType = WebSourceTypeUrlLink;
webView.url = @"http://www.youtansu.com";
[self.navigationController pushViewController:webView animated:YES];
}
#pragma mark
-(void)registBtnAction:(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.passTexFied.text.length >=6 && self.passTexFied.text.length <=20) || self.passTexFied.text.length == 0) {
GIGA_ShowToast(@"请输入6~20位密码");
return;
}
[self regeist:btn];
}
//
-(void)regeist:(UIButton *)btn{
btn.userInteractionEnabled = NO;
NSDictionary *param = @{@"username":self.phoneNumberTextField.text,@"verifiedCode":self.codeTextField.text,@"password":self.passTexFied.text};
GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:@"sys/v1/phoneregister" method:RequestPostMethod parms:param];
[api requstDataWithResult:^(GiGaAPIResult *result) {
btn.userInteractionEnabled = YES;
GILog(@"注册->%@",result.message);
if (result.code == 0) {
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);
}else{
GIGA_ShowToast(result.message);
}
}];
}
- (void)didReceiveMemoryWarning {

View File

@ -42,7 +42,7 @@
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<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"/>
@ -51,7 +51,7 @@
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<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"/>
@ -60,7 +60,7 @@
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<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"/>
@ -110,7 +110,7 @@
</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">
<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"/>

View File

@ -14,6 +14,9 @@
#import "WXApi.h"
#import "GiGaNetManager.h"
#import "WeiIXinApiManager.h"
#import "GiGaBaseAPiRequest.h"
#import "GiGaUser.h"
#import "GiGaServerConfig.h"
@interface GiGaUserLoginVC ()
@property (weak, nonatomic) IBOutlet UIImageView *userImagView;
@ -24,6 +27,8 @@
@property (weak, nonatomic) IBOutlet UIButton *weiXinLoginBtn;
@property (weak, nonatomic) IBOutlet UIButton *registBtn;
@property (weak, nonatomic) IBOutlet UIImageView *wexinbtnImageView;
@property (weak, nonatomic) IBOutlet UIButton *secretBtn;
@end
@ -35,16 +40,20 @@
// Do any additional setup after loading the view from its nib.
[self setUpX];
[self textFieldUI];
[self.view bringSubviewToFront:self.weiXinLoginBtn];
[self.registBtn addTarget:self action:@selector(registBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.loginBtn addTarget:self action:@selector(loginBtnAction:) forControlEvents:UIControlEventTouchUpInside];
[self.weiXinLoginBtn addTarget:self
action:@selector(weiXinLoginAction) forControlEvents:UIControlEventTouchUpInside];
[self.secretBtn addTarget:self action:@selector(secretBtnAction:) forControlEvents:UIControlEventTouchUpInside];
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;
}
}
-(void)dealloc{
@ -56,8 +65,7 @@
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 setImage:[UIImage imageNamed:@"btn_back"] forState:UIControlStateNormal];
[rightBtn addTarget:self action:@selector(rightBtnAction) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
}
@ -66,9 +74,8 @@
//self.acountTextField.attributedPlaceholder = @"";
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:@""];
UIImageView *acountViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,9, 12, 22)];
acountViewIcon.image = [UIImage imageNamed:@"ic_number"];
[acountView addSubview:acountViewIcon];
self.acountTextField.leftView = acountView;
self.acountTextField.leftViewMode = UITextFieldViewModeAlways;
@ -76,9 +83,8 @@
// 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)];
passView.backgroundColor = [UIColor redColor];
UIImageView *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)];
passViewIcon.image = [UIImage imageNamed:@""];
UIImageView *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 9, 12, 22)];
passViewIcon.image = [UIImage imageNamed:@"icon_key"];
[passView addSubview:passViewIcon];
self.passwordTextField.leftView = passView;
self.passwordTextField.leftViewMode = UITextFieldViewModeAlways;
@ -121,7 +127,7 @@
}
#pragma mark -
#pragma mark
-(void)loginBtnAction:(UIButton *)btn{
if (self.acountTextField.text == nil) {
@ -137,15 +143,63 @@
GIGA_ShowToast(@"密码不能为空");
return;
}
if (self.passwordTextField.text.length < 6) {
GIGA_ShowToast(@"密码长度不能小于六位字符");
return;
}
// if (self.passwordTextField.text.length < =6) {
// GIGA_ShowToast(@"密码长度不能小于六位字符");
// return;
// }
// [self dismissViewControllerAnimated:YES completion:nil];
[self loginWithAction:btn];
}
-(void)loginWithAction:(UIButton *)btn{
NSDictionary *params = @{
@"username":self.acountTextField.text,
@"password":self.passwordTextField.text
};
// GiGaBaseAPiRequest *loginApi = [GiGaBaseAPiRequest initWithRequestPath:@"sys/v1/login" method:RequestPostMethod parms:params];
//weakify(self);
// [loginApi requstDataWithResult:^(GiGaAPIResult *result) {
// GILog(@"**登陆***\n resultDic:%ld\n code:%@\n *******\n",(long)result.code,result.dic);
// if (result.success) {
// GILog(@"****登陆成功****");
// [self saveUserData];
// [self dismissViewControllerAnimated:YES completion:nil];
// }
// }];
[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);
[self.view hideToastActivity];
GiGaAPIResult *result = [[GiGaAPIResult alloc] initWithDictionary:resDic];
GILog(@"**登陆***\n code:%ld\n message:%@\n *******\n",result.code,result.message);
if (result.success) {
[GiGaUserDefault saveToken:resDic[@"token"]];
//
[MobClick endEvent:MobClick_UserLogin];
//123
[GiGaUserDefault saveUserId:@"123"];
GIGA_WIndowTost(@"登录成功!");
[self dismissViewControllerAnimated:YES completion:nil];
}
}];
}
-(void)saveUserData{
//
[MobClick endEvent:MobClick_UserLogin];
[GiGaUserDefault saveUserId:@"123"];
[self dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark -
@ -201,4 +255,27 @@
}
//
-(void)userRegistSuccsessNoti:(NSNotification *)noti{
self.acountTextField.text =(NSString *)noti.object;
}
//
-(void)secretBtnAction:(UIButton *)btn{
btn.selected = !btn.selected;
if (btn.selected) {
//
self.passwordTextField.secureTextEntry = YES;
[btn setImage:[UIImage imageNamed:@"btn_tab_notselect"] forState:UIControlStateSelected];
}else{
self.passwordTextField.secureTextEntry = NO;
[btn setImage:[UIImage imageNamed:@"btn_tab_desplay"] forState:UIControlStateNormal];
}
}
@end

View File

@ -1,5 +1,5 @@
<?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" colorMatched="YES">
<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>
@ -7,6 +7,7 @@
<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>
@ -16,9 +17,11 @@
<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="secretBtn" destination="Szo-8C-Zin" id="tAR-yS-dZE"/>
<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"/>
@ -26,148 +29,146 @@
<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="44" width="100" height="100"/>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_circle_avatar" translatesAutoresizingMaskIntoConstraints="NO" id="RIl-8E-GcR">
<rect key="frame" x="131" y="102" width="114" height="114"/>
<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"/>
<constraint firstAttribute="width" secondItem="RIl-8E-GcR" secondAttribute="height" multiplier="1:1" id="bfp-Q6-OmK"/>
</constraints>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="账号" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Yiv-h8-4V1">
<rect key="frame" x="32" y="160" width="309" height="30"/>
<color key="backgroundColor" red="0.99607843139999996" green="0.94117647059999998" blue="0.69803921570000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="手机号码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Yiv-h8-4V1">
<rect key="frame" x="65" y="232" width="245" height="54"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="LOI-yC-v4S"/>
<constraint firstAttribute="height" constant="54" id="593-Iu-1XC"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="密码" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Y1I-OE-6t1">
<rect key="frame" x="33" y="224" width="309" height="30"/>
<color key="backgroundColor" red="0.99607843139999996" green="0.94117647059999998" blue="0.69803921570000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Y1I-OE-6t1">
<rect key="frame" x="65" y="302" width="167" height="56"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="eG3-4a-G4H"/>
<constraint firstAttribute="height" constant="56" id="36A-Rk-HnV"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qzA-vE-CGR">
<rect key="frame" x="33" y="194" width="309" height="1"/>
<color key="backgroundColor" red="0.74901960779999999" green="0.74509803919999995" blue="0.74509803919999995" alpha="1" colorSpace="calibratedRGB"/>
<rect key="frame" x="65" y="286" width="245" height="2"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Nz8-a3-phJ"/>
<constraint firstAttribute="height" constant="2" id="HWD-IP-ygd"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZJU-Uo-5TM">
<rect key="frame" x="33.5" y="259" width="309" height="1"/>
<color key="backgroundColor" red="0.74901960779999999" green="0.74509803919999995" blue="0.74509803919999995" alpha="1" colorSpace="calibratedRGB"/>
<rect key="frame" x="65" y="366" width="245" height="2"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="NqZ-5s-7Mg"/>
<constraint firstAttribute="height" constant="2" id="xGp-5h-fFD"/>
</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="275" width="60" height="30"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Of-JP-gMR">
<rect key="frame" x="65" y="444" width="245" height="42"/>
<color key="backgroundColor" red="0.0" green="0.87058823529411766" blue="0.74117647058823533" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="3Nq-gh-4BK"/>
<constraint firstAttribute="width" constant="60" id="Pv8-8w-ASz"/>
<constraint firstAttribute="height" constant="42" id="H8S-wQ-QzQ"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
<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" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Szo-8C-Zin">
<rect key="frame" x="246" y="309" width="64" height="42"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="gsN-u1-wM1"/>
<constraint firstAttribute="width" constant="64" id="ulR-IN-Puf"/>
</constraints>
<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"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="aCl-R3-YZF"/>
<constraint firstAttribute="width" constant="161" id="hOA-ag-StR"/>
</constraints>
<fontDescription key="fontDescription" type="system" 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"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="chq-bd-6sQ">
<rect key="frame" x="246" y="384" width="64" height="49"/>
<constraints>
<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"/>
<state key="normal" title="忘记密码">
<color key="titleColor" red="0.19801172859999999" green="0.55107868019999995" blue="0.17657151269999999" 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>
<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="337" 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="399" 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="490" 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="490" 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="480" 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="515" width="309" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="rYQ-VZ-BLB"/>
</constraints>
<state key="normal" title="微信账号登录"/>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<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="i5M-Pr-FkT" 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="i5M-Pr-FkT" 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 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="i5M-Pr-FkT" secondAttribute="centerX" id="LX6-0I-g2t"/>
<constraint firstItem="dnL-WV-spY" firstAttribute="centerX" secondItem="i5M-Pr-FkT" 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="i5M-Pr-FkT" 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="i5M-Pr-FkT" secondAttribute="leading" constant="32" id="Ux4-8Q-gMv"/>
<constraint firstItem="ZJU-Uo-5TM" firstAttribute="centerX" secondItem="i5M-Pr-FkT" 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="i5M-Pr-FkT" 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="i5M-Pr-FkT" 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="i5M-Pr-FkT" 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="i5M-Pr-FkT" secondAttribute="centerX" id="uNF-sL-Kjk"/>
<constraint firstItem="qzA-vE-CGR" firstAttribute="width" secondItem="Yiv-h8-4V1" secondAttribute="width" id="ukd-Wg-7Qy"/>
<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"/>
<constraint firstItem="Yiv-h8-4V1" firstAttribute="leading" secondItem="1vd-yc-0a5" secondAttribute="leading" constant="65" id="H5c-S5-H7V"/>
<constraint firstItem="RIl-8E-GcR" firstAttribute="centerX" secondItem="1vd-yc-0a5" secondAttribute="centerX" id="KlR-Tg-PMd"/>
<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="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="8Of-JP-gMR" firstAttribute="top" secondItem="chq-bd-6sQ" secondAttribute="bottom" constant="11" id="kQN-mZ-Kew"/>
<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>
<point key="canvasLocation" x="33.5" y="53.5"/>
<viewLayoutGuide key="safeArea" id="1vd-yc-0a5"/>
<point key="canvasLocation" x="10.5" y="22.5"/>
</view>
</objects>
<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>

View File

@ -29,7 +29,7 @@
-(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)];
@ -38,7 +38,6 @@
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)];

View File

@ -55,11 +55,13 @@
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[IQKeyboardManager sharedManager].enable = NO;
[[IQKeyboardManager sharedManager] setEnableAutoToolbar:NO];
}
- (void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[IQKeyboardManager sharedManager].enable = YES;
[[IQKeyboardManager sharedManager] setEnableAutoToolbar:YES];
}
-(void)showFlyingCommit{

View File

@ -356,10 +356,7 @@
#pragma mark
-(void)testBtnAcion:(UIButton *)btn{
// [self startMaskTime];
// return ;
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
@ -447,7 +444,7 @@
UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
leftBtn.frame = CGRectMake(0, 0, 40, 40);
leftBtn.backgroundColor = [UIColor redColor];
[leftBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[leftBtn setImage:[UIImage imageNamed:@"btn_back"] forState:UIControlStateNormal];
[leftBtn addTarget:self action:@selector(leftBtnAction) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
//rightItem
@ -465,7 +462,6 @@
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
GIGA_ShowToast(@"userLogin!");
GiGaMasssagesVC *masageVC= [[GiGaMasssagesVC alloc] init];
[self.navigationController pushViewController:masageVC animated:YES];

View File

@ -4,7 +4,7 @@
//
// Created by lianxiang on 2018/8/14.
// Copyright © 2018 com.giga.ios. All rights reserved.
//
//
#import "GiGaCommentView.h"
#import "Masonry.h"
@ -81,8 +81,7 @@
make.top.mas_equalTo(self.userAvtar.mas_bottom).mas_offset(3);
make.left.mas_equalTo(self.mas_left).mas_offset(5);
}];
float width = msglabel.frame.size.width > namelabel.frame.size.width ? msglabel.frame.size.width:namelabel.frame.size.width ;

View File

@ -19,10 +19,9 @@
self = [super initWithFrame:frame];
if (self) {
// self.backgroundColor = [UIColor blackColor];
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissSelfViewTap)];
// [self addGestureRecognizer:tap];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissSelfViewTap)];
[self addGestureRecognizer:tap];
[self creatInputView];
[self bringSubviewToFront:_commitInputView];
@ -54,6 +53,7 @@
textField.backgroundColor = [UIColor lightGrayColor];
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
textField.delegate = self;
textField.returnKeyType = UIReturnKeySend;
[commitView addSubview:textField];
self.inputTextField = textField;
@ -71,7 +71,8 @@
}
-(void)dismissSelfViewTap{
[self removeFromSuperview];
//[self removeFromSuperview];
[self.inputTextField resignFirstResponder];
}
-(void)sendBtnAction:(UIButton *)btn{
@ -95,7 +96,8 @@
self.SendCommentHandler(self.inputTextField.text);
}
[self dismissKeyboard];
if (![self.inputTextField isFirstResponder]) return;
[self dismissKeyboard];
}
@ -138,7 +140,6 @@
// get a rect for the textView frame
CGRect commentInputViewFrame = self.commitInputView.frame;
commentInputViewFrame.origin.y = self.bounds.size.height - (keyboardBounds.size.height + commentInputViewFrame.size.height);
// animations settings
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
@ -147,7 +148,6 @@
// set views with new info
self.commitInputView.frame = commentInputViewFrame;
[UIView commitAnimations];

View File

@ -12,7 +12,9 @@
@property(nonatomic,copy) NSString *userId;
@property(nonatomic,copy) NSString *name;
@property(nonatomic,copy) NSString *avatar;
@property(nonatomic,copy) NSString *avatar;//头像
@property(nonatomic,copy) NSString *tel;
@property(nonatomic,copy) NSString *token;
@end