Commit 4ff16c8e4ba4c36b92f4a93d88a0bbe0922087e8
1 parent
b6b29b34
优化demo
Showing
11 changed files
with
140 additions
and
181 deletions
CNLiveUserSystemDemo.xcodeproj/project.pbxproj
| @@ -24,6 +24,7 @@ | @@ -24,6 +24,7 @@ | ||
| 24 | 810D9B7F1D8FCD1900B7A776 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */; }; | 24 | 810D9B7F1D8FCD1900B7A776 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B7E1D8FCD1900B7A776 /* libsqlite3.0.tbd */; }; |
| 25 | 810D9B811D8FCD3200B7A776 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B801D8FCD3200B7A776 /* libc++.tbd */; }; | 25 | 810D9B811D8FCD3200B7A776 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 810D9B801D8FCD3200B7A776 /* libc++.tbd */; }; |
| 26 | 810D9B841D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 810D9B831D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m */; }; | 26 | 810D9B841D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 810D9B831D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m */; }; |
| 27 | + 810EB6361E54398300C33D18 /* touxiang.png in Resources */ = {isa = PBXBuildFile; fileRef = 810EB6351E54398300C33D18 /* touxiang.png */; }; | ||
| 27 | 811600EE1D927E7E003CAE7D /* MKAnnotationView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600CD1D927E7E003CAE7D /* MKAnnotationView+WebCache.m */; }; | 28 | 811600EE1D927E7E003CAE7D /* MKAnnotationView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600CD1D927E7E003CAE7D /* MKAnnotationView+WebCache.m */; }; |
| 28 | 811600EF1D927E7E003CAE7D /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600CF1D927E7E003CAE7D /* NSData+ImageContentType.m */; }; | 29 | 811600EF1D927E7E003CAE7D /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600CF1D927E7E003CAE7D /* NSData+ImageContentType.m */; }; |
| 29 | 811600F01D927E7E003CAE7D /* SDImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600D11D927E7E003CAE7D /* SDImageCache.m */; }; | 30 | 811600F01D927E7E003CAE7D /* SDImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 811600D11D927E7E003CAE7D /* SDImageCache.m */; }; |
| @@ -132,6 +133,7 @@ | @@ -132,6 +133,7 @@ | ||
| 132 | 810D9B801D8FCD3200B7A776 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; | 133 | 810D9B801D8FCD3200B7A776 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; |
| 133 | 810D9B821D8FD2DF00B7A776 /* CNLiveThirdLoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveThirdLoginManager.h; sourceTree = "<group>"; }; | 134 | 810D9B821D8FD2DF00B7A776 /* CNLiveThirdLoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveThirdLoginManager.h; sourceTree = "<group>"; }; |
| 134 | 810D9B831D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveThirdLoginManager.m; sourceTree = "<group>"; }; | 135 | 810D9B831D8FD2DF00B7A776 /* CNLiveThirdLoginManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveThirdLoginManager.m; sourceTree = "<group>"; }; |
| 136 | + 810EB6351E54398300C33D18 /* touxiang.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = touxiang.png; sourceTree = "<group>"; }; | ||
| 135 | 811600CC1D927E7E003CAE7D /* MKAnnotationView+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MKAnnotationView+WebCache.h"; sourceTree = "<group>"; }; | 137 | 811600CC1D927E7E003CAE7D /* MKAnnotationView+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MKAnnotationView+WebCache.h"; sourceTree = "<group>"; }; |
| 136 | 811600CD1D927E7E003CAE7D /* MKAnnotationView+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MKAnnotationView+WebCache.m"; sourceTree = "<group>"; }; | 138 | 811600CD1D927E7E003CAE7D /* MKAnnotationView+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MKAnnotationView+WebCache.m"; sourceTree = "<group>"; }; |
| 137 | 811600CE1D927E7E003CAE7D /* NSData+ImageContentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+ImageContentType.h"; sourceTree = "<group>"; }; | 139 | 811600CE1D927E7E003CAE7D /* NSData+ImageContentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+ImageContentType.h"; sourceTree = "<group>"; }; |
| @@ -450,6 +452,7 @@ | @@ -450,6 +452,7 @@ | ||
| 450 | 812642C31D86A7A800B402CA /* CNLiveUserSystemDemo */ = { | 452 | 812642C31D86A7A800B402CA /* CNLiveUserSystemDemo */ = { |
| 451 | isa = PBXGroup; | 453 | isa = PBXGroup; |
| 452 | children = ( | 454 | children = ( |
| 455 | + 810EB6351E54398300C33D18 /* touxiang.png */, | ||
| 453 | 81661FCB1DDED9DD00E3C65A /* cancel.png */, | 456 | 81661FCB1DDED9DD00E3C65A /* cancel.png */, |
| 454 | 812642C71D86A7A800B402CA /* AppDelegate.h */, | 457 | 812642C71D86A7A800B402CA /* AppDelegate.h */, |
| 455 | 812642C81D86A7A800B402CA /* AppDelegate.m */, | 458 | 812642C81D86A7A800B402CA /* AppDelegate.m */, |
| @@ -694,6 +697,7 @@ | @@ -694,6 +697,7 @@ | ||
| 694 | 812642D11D86A7A800B402CA /* Assets.xcassets in Resources */, | 697 | 812642D11D86A7A800B402CA /* Assets.xcassets in Resources */, |
| 695 | 812642CF1D86A7A800B402CA /* Main.storyboard in Resources */, | 698 | 812642CF1D86A7A800B402CA /* Main.storyboard in Resources */, |
| 696 | 81661FCC1DDED9DD00E3C65A /* cancel.png in Resources */, | 699 | 81661FCC1DDED9DD00E3C65A /* cancel.png in Resources */, |
| 700 | + 810EB6361E54398300C33D18 /* touxiang.png in Resources */, | ||
| 697 | 810D9B661D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle in Resources */, | 701 | 810D9B661D8FB70600B7A776 /* TencentOpenApi_IOS_Bundle.bundle in Resources */, |
| 698 | 8187A90D1D8E9A7B007FAFB6 /* SVProgressHUD.bundle in Resources */, | 702 | 8187A90D1D8E9A7B007FAFB6 /* SVProgressHUD.bundle in Resources */, |
| 699 | 810D9B681D8FB70600B7A776 /* WeiboSDK.bundle in Resources */, | 703 | 810D9B681D8FB70600B7A776 /* WeiboSDK.bundle in Resources */, |
CNLiveUserSystemDemo.xcodeproj/project.xcworkspace/xcuserdata/iOS.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
CNLiveUserSystemDemo.xcodeproj/xcuserdata/iOS.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
| @@ -13,133 +13,5 @@ | @@ -13,133 +13,5 @@ | ||
| 13 | stopOnStyle = "0"> | 13 | stopOnStyle = "0"> |
| 14 | </BreakpointContent> | 14 | </BreakpointContent> |
| 15 | </BreakpointProxy> | 15 | </BreakpointProxy> |
| 16 | - <BreakpointProxy | ||
| 17 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 18 | - <BreakpointContent | ||
| 19 | - shouldBeEnabled = "Yes" | ||
| 20 | - ignoreCount = "0" | ||
| 21 | - continueAfterRunningActions = "No" | ||
| 22 | - filePath = "CNLiveUserSystemDemo/Conreollers/RegisterViewController.m" | ||
| 23 | - timestampString = "501061773.344801" | ||
| 24 | - startingColumnNumber = "9223372036854775807" | ||
| 25 | - endingColumnNumber = "9223372036854775807" | ||
| 26 | - startingLineNumber = "60" | ||
| 27 | - endingLineNumber = "60" | ||
| 28 | - landmarkName = "-verificationBtnAction" | ||
| 29 | - landmarkType = "7"> | ||
| 30 | - </BreakpointContent> | ||
| 31 | - </BreakpointProxy> | ||
| 32 | - <BreakpointProxy | ||
| 33 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 34 | - <BreakpointContent | ||
| 35 | - shouldBeEnabled = "Yes" | ||
| 36 | - ignoreCount = "0" | ||
| 37 | - continueAfterRunningActions = "No" | ||
| 38 | - filePath = "CNLiveUserSystemDemo/Conreollers/RegisterViewController.m" | ||
| 39 | - timestampString = "501061776.857064" | ||
| 40 | - startingColumnNumber = "9223372036854775807" | ||
| 41 | - endingColumnNumber = "9223372036854775807" | ||
| 42 | - startingLineNumber = "63" | ||
| 43 | - endingLineNumber = "63" | ||
| 44 | - landmarkName = "-verificationBtnAction" | ||
| 45 | - landmarkType = "7"> | ||
| 46 | - </BreakpointContent> | ||
| 47 | - </BreakpointProxy> | ||
| 48 | - <BreakpointProxy | ||
| 49 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 50 | - <BreakpointContent | ||
| 51 | - shouldBeEnabled = "Yes" | ||
| 52 | - ignoreCount = "0" | ||
| 53 | - continueAfterRunningActions = "No" | ||
| 54 | - filePath = "CNLiveUserSystemDemo/Conreollers/ViewController.m" | ||
| 55 | - timestampString = "501142248.547315" | ||
| 56 | - startingColumnNumber = "9223372036854775807" | ||
| 57 | - endingColumnNumber = "9223372036854775807" | ||
| 58 | - startingLineNumber = "73" | ||
| 59 | - endingLineNumber = "73" | ||
| 60 | - landmarkName = "-tapGesturedDetected:" | ||
| 61 | - landmarkType = "7"> | ||
| 62 | - <Locations> | ||
| 63 | - <Location | ||
| 64 | - shouldBeEnabled = "Yes" | ||
| 65 | - ignoreCount = "0" | ||
| 66 | - continueAfterRunningActions = "No" | ||
| 67 | - symbolName = "-[ViewController tapGesturedDetected:]" | ||
| 68 | - moduleName = "CNLiveUserSystemDemo" | ||
| 69 | - usesParentBreakpointCondition = "Yes" | ||
| 70 | - urlString = "file:///Users/android/Git/CNLiveUserSystemSDK/CNLiveUserSystemDemo/Conreollers/ViewController.m" | ||
| 71 | - timestampString = "502620330.058707" | ||
| 72 | - startingColumnNumber = "9223372036854775807" | ||
| 73 | - endingColumnNumber = "9223372036854775807" | ||
| 74 | - startingLineNumber = "73" | ||
| 75 | - endingLineNumber = "73" | ||
| 76 | - offsetFromSymbolStart = "84"> | ||
| 77 | - </Location> | ||
| 78 | - <Location | ||
| 79 | - shouldBeEnabled = "Yes" | ||
| 80 | - ignoreCount = "0" | ||
| 81 | - continueAfterRunningActions = "No" | ||
| 82 | - symbolName = "__38-[ViewController tapGesturedDetected:]_block_invoke" | ||
| 83 | - moduleName = "CNLiveUserSystemDemo" | ||
| 84 | - usesParentBreakpointCondition = "Yes" | ||
| 85 | - urlString = "file:///Users/android/Git/CNLiveUserSystemSDK/CNLiveUserSystemDemo/Conreollers/ViewController.m" | ||
| 86 | - timestampString = "502620330.062799" | ||
| 87 | - startingColumnNumber = "9223372036854775807" | ||
| 88 | - endingColumnNumber = "9223372036854775807" | ||
| 89 | - startingLineNumber = "74" | ||
| 90 | - endingLineNumber = "74" | ||
| 91 | - offsetFromSymbolStart = "28"> | ||
| 92 | - </Location> | ||
| 93 | - </Locations> | ||
| 94 | - </BreakpointContent> | ||
| 95 | - </BreakpointProxy> | ||
| 96 | - <BreakpointProxy | ||
| 97 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 98 | - <BreakpointContent | ||
| 99 | - shouldBeEnabled = "Yes" | ||
| 100 | - ignoreCount = "0" | ||
| 101 | - continueAfterRunningActions = "No" | ||
| 102 | - filePath = "CNLiveUserSystemDemo/Conreollers/RegisterViewController.m" | ||
| 103 | - timestampString = "501385209.643505" | ||
| 104 | - startingColumnNumber = "9223372036854775807" | ||
| 105 | - endingColumnNumber = "9223372036854775807" | ||
| 106 | - startingLineNumber = "89" | ||
| 107 | - endingLineNumber = "89" | ||
| 108 | - landmarkName = "-loginBtnAction" | ||
| 109 | - landmarkType = "7"> | ||
| 110 | - </BreakpointContent> | ||
| 111 | - </BreakpointProxy> | ||
| 112 | - <BreakpointProxy | ||
| 113 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 114 | - <BreakpointContent | ||
| 115 | - shouldBeEnabled = "Yes" | ||
| 116 | - ignoreCount = "0" | ||
| 117 | - continueAfterRunningActions = "No" | ||
| 118 | - filePath = "CNLiveUserSystemDemo/Conreollers/RegisterViewController.m" | ||
| 119 | - timestampString = "501385209.643505" | ||
| 120 | - startingColumnNumber = "9223372036854775807" | ||
| 121 | - endingColumnNumber = "9223372036854775807" | ||
| 122 | - startingLineNumber = "95" | ||
| 123 | - endingLineNumber = "95" | ||
| 124 | - landmarkName = "-loginBtnAction" | ||
| 125 | - landmarkType = "7"> | ||
| 126 | - </BreakpointContent> | ||
| 127 | - </BreakpointProxy> | ||
| 128 | - <BreakpointProxy | ||
| 129 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
| 130 | - <BreakpointContent | ||
| 131 | - shouldBeEnabled = "Yes" | ||
| 132 | - ignoreCount = "0" | ||
| 133 | - continueAfterRunningActions = "No" | ||
| 134 | - filePath = "CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUploadIcon.m" | ||
| 135 | - timestampString = "501665186.686912" | ||
| 136 | - startingColumnNumber = "9223372036854775807" | ||
| 137 | - endingColumnNumber = "9223372036854775807" | ||
| 138 | - startingLineNumber = "36" | ||
| 139 | - endingLineNumber = "36" | ||
| 140 | - landmarkName = "-getAccessTokenRequestWithAppId:uid:icon:token:secret:success:failure:" | ||
| 141 | - landmarkType = "7"> | ||
| 142 | - </BreakpointContent> | ||
| 143 | - </BreakpointProxy> | ||
| 144 | </Breakpoints> | 16 | </Breakpoints> |
| 145 | </Bucket> | 17 | </Bucket> |
CNLiveUserSystemDemo/Conreollers/LoginViewController.m
| @@ -32,6 +32,11 @@ | @@ -32,6 +32,11 @@ | ||
| 32 | [super viewDidLoad]; | 32 | [super viewDidLoad]; |
| 33 | self.title = @"登录"; | 33 | self.title = @"登录"; |
| 34 | self.view.backgroundColor = [UIColor whiteColor]; | 34 | self.view.backgroundColor = [UIColor whiteColor]; |
| 35 | + | ||
| 36 | + UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init]; | ||
| 37 | + backItem.title = @"back"; | ||
| 38 | + self.navigationItem.backBarButtonItem = backItem; | ||
| 39 | + | ||
| 35 | [self.view addSubview:self.idAndPwdView]; | 40 | [self.view addSubview:self.idAndPwdView]; |
| 36 | [self.view addSubview:self.loginBtn]; | 41 | [self.view addSubview:self.loginBtn]; |
| 37 | [self.view addSubview:self.messageLoginBtn]; | 42 | [self.view addSubview:self.messageLoginBtn]; |
| @@ -133,12 +138,15 @@ | @@ -133,12 +138,15 @@ | ||
| 133 | { | 138 | { |
| 134 | if (!_loginBtn) { | 139 | if (!_loginBtn) { |
| 135 | _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 140 | _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 136 | - _loginBtn.backgroundColor = [UIColor orangeColor]; | ||
| 137 | [_loginBtn setFrame:CGRectMake(10, 250, KScreenWidth - 20, 40)]; | 141 | [_loginBtn setFrame:CGRectMake(10, 250, KScreenWidth - 20, 40)]; |
| 138 | - _loginBtn.layer.cornerRadius = 20; | ||
| 139 | - _loginBtn.layer.masksToBounds = YES; | ||
| 140 | [_loginBtn setTitle:@"登 录" forState:UIControlStateNormal]; | 142 | [_loginBtn setTitle:@"登 录" forState:UIControlStateNormal]; |
| 141 | [_loginBtn addTarget:self action:@selector(loginBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 143 | [_loginBtn addTarget:self action:@selector(loginBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 144 | + _loginBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 145 | + [_loginBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 146 | + _loginBtn.layer.cornerRadius = 20; | ||
| 147 | + _loginBtn.layer.masksToBounds = YES; | ||
| 148 | + _loginBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 149 | + _loginBtn.layer.borderWidth = 1; | ||
| 142 | } | 150 | } |
| 143 | return _loginBtn; | 151 | return _loginBtn; |
| 144 | } | 152 | } |
| @@ -152,6 +160,8 @@ | @@ -152,6 +160,8 @@ | ||
| 152 | _messageLoginBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | 160 | _messageLoginBtn.titleLabel.font = [UIFont systemFontOfSize:15]; |
| 153 | [_messageLoginBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; | 161 | [_messageLoginBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; |
| 154 | [_messageLoginBtn addTarget:self action:@selector(messageLoginBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 162 | [_messageLoginBtn addTarget:self action:@selector(messageLoginBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 163 | + [_messageLoginBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 164 | + | ||
| 155 | } | 165 | } |
| 156 | return _messageLoginBtn; | 166 | return _messageLoginBtn; |
| 157 | } | 167 | } |
| @@ -165,6 +175,8 @@ | @@ -165,6 +175,8 @@ | ||
| 165 | _registBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | 175 | _registBtn.titleLabel.font = [UIFont systemFontOfSize:15]; |
| 166 | [_registBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; | 176 | [_registBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; |
| 167 | [_registBtn addTarget:self action:@selector(registBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 177 | [_registBtn addTarget:self action:@selector(registBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 178 | + [_registBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 179 | + | ||
| 168 | } | 180 | } |
| 169 | return _registBtn; | 181 | return _registBtn; |
| 170 | } | 182 | } |
| @@ -174,7 +186,7 @@ | @@ -174,7 +186,7 @@ | ||
| 174 | if (!_thirdpartyLoginLbl) { | 186 | if (!_thirdpartyLoginLbl) { |
| 175 | _thirdpartyLoginLbl = [[UILabel alloc] initWithFrame:CGRectMake(0, KScreenHeight - 200, KScreenWidth, 15)]; | 187 | _thirdpartyLoginLbl = [[UILabel alloc] initWithFrame:CGRectMake(0, KScreenHeight - 200, KScreenWidth, 15)]; |
| 176 | _thirdpartyLoginLbl.textAlignment = NSTextAlignmentCenter; | 188 | _thirdpartyLoginLbl.textAlignment = NSTextAlignmentCenter; |
| 177 | - _thirdpartyLoginLbl.textColor = [UIColor orangeColor]; | 189 | + _thirdpartyLoginLbl.textColor = [UIColor blackColor]; |
| 178 | _thirdpartyLoginLbl.text = @"第三方账号登录"; | 190 | _thirdpartyLoginLbl.text = @"第三方账号登录"; |
| 179 | _thirdpartyLoginLbl.font = [UIFont systemFontOfSize:15]; | 191 | _thirdpartyLoginLbl.font = [UIFont systemFontOfSize:15]; |
| 180 | } | 192 | } |
| @@ -185,12 +197,15 @@ | @@ -185,12 +197,15 @@ | ||
| 185 | { | 197 | { |
| 186 | if (!_weChatBtn) { | 198 | if (!_weChatBtn) { |
| 187 | _weChatBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 199 | _weChatBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 188 | - _weChatBtn.backgroundColor = [UIColor orangeColor]; | ||
| 189 | [_weChatBtn setFrame:CGRectMake(SpaceWidth, KScreenHeight-150, 80, 40)]; | 200 | [_weChatBtn setFrame:CGRectMake(SpaceWidth, KScreenHeight-150, 80, 40)]; |
| 190 | - _weChatBtn.layer.cornerRadius = 20; | ||
| 191 | - _weChatBtn.layer.masksToBounds = YES; | ||
| 192 | [_weChatBtn setTitle:@"微信" forState:UIControlStateNormal]; | 201 | [_weChatBtn setTitle:@"微信" forState:UIControlStateNormal]; |
| 193 | [_weChatBtn addTarget:self action:@selector(weChatBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 202 | [_weChatBtn addTarget:self action:@selector(weChatBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 203 | + _weChatBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 204 | + [_weChatBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 205 | + _weChatBtn.layer.cornerRadius = 20; | ||
| 206 | + _weChatBtn.layer.masksToBounds = YES; | ||
| 207 | + _weChatBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 208 | + _weChatBtn.layer.borderWidth = 1; | ||
| 194 | } | 209 | } |
| 195 | return _weChatBtn; | 210 | return _weChatBtn; |
| 196 | } | 211 | } |
| @@ -199,12 +214,15 @@ | @@ -199,12 +214,15 @@ | ||
| 199 | { | 214 | { |
| 200 | if (!_sinaBtn) { | 215 | if (!_sinaBtn) { |
| 201 | _sinaBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 216 | _sinaBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 202 | - _sinaBtn.backgroundColor = [UIColor orangeColor]; | ||
| 203 | [_sinaBtn setFrame:CGRectMake(SpaceWidth*2+80, KScreenHeight-150, 80, 40)]; | 217 | [_sinaBtn setFrame:CGRectMake(SpaceWidth*2+80, KScreenHeight-150, 80, 40)]; |
| 204 | - _sinaBtn.layer.cornerRadius = 20; | ||
| 205 | - _sinaBtn.layer.masksToBounds = YES; | ||
| 206 | [_sinaBtn setTitle:@"微博" forState:UIControlStateNormal]; | 218 | [_sinaBtn setTitle:@"微博" forState:UIControlStateNormal]; |
| 207 | [_sinaBtn addTarget:self action:@selector(sinaBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 219 | [_sinaBtn addTarget:self action:@selector(sinaBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 220 | + _sinaBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 221 | + [_sinaBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 222 | + _sinaBtn.layer.cornerRadius = 20; | ||
| 223 | + _sinaBtn.layer.masksToBounds = YES; | ||
| 224 | + _sinaBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 225 | + _sinaBtn.layer.borderWidth = 1; | ||
| 208 | } | 226 | } |
| 209 | return _sinaBtn; | 227 | return _sinaBtn; |
| 210 | } | 228 | } |
| @@ -213,12 +231,15 @@ | @@ -213,12 +231,15 @@ | ||
| 213 | { | 231 | { |
| 214 | if (!_qqBtn) { | 232 | if (!_qqBtn) { |
| 215 | _qqBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 233 | _qqBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 216 | - _qqBtn.backgroundColor = [UIColor orangeColor]; | ||
| 217 | [_qqBtn setFrame:CGRectMake(SpaceWidth*3+80*2, KScreenHeight-150, 80, 40)]; | 234 | [_qqBtn setFrame:CGRectMake(SpaceWidth*3+80*2, KScreenHeight-150, 80, 40)]; |
| 218 | - _qqBtn.layer.cornerRadius = 20; | ||
| 219 | - _qqBtn.layer.masksToBounds = YES; | ||
| 220 | [_qqBtn setTitle:@"QQ" forState:UIControlStateNormal]; | 235 | [_qqBtn setTitle:@"QQ" forState:UIControlStateNormal]; |
| 221 | [_qqBtn addTarget:self action:@selector(qqBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 236 | [_qqBtn addTarget:self action:@selector(qqBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 237 | + _qqBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 238 | + [_qqBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 239 | + _qqBtn.layer.cornerRadius = 20; | ||
| 240 | + _qqBtn.layer.masksToBounds = YES; | ||
| 241 | + _qqBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 242 | + _qqBtn.layer.borderWidth = 1; | ||
| 222 | } | 243 | } |
| 223 | return _qqBtn; | 244 | return _qqBtn; |
| 224 | } | 245 | } |
CNLiveUserSystemDemo/Conreollers/ModifyUserInfoViewController.m
| @@ -24,6 +24,10 @@ | @@ -24,6 +24,10 @@ | ||
| 24 | [super viewDidLoad]; | 24 | [super viewDidLoad]; |
| 25 | self.view.backgroundColor = [UIColor whiteColor]; | 25 | self.view.backgroundColor = [UIColor whiteColor]; |
| 26 | 26 | ||
| 27 | + UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init]; | ||
| 28 | + backItem.title = @"back"; | ||
| 29 | + self.navigationItem.backBarButtonItem = backItem; | ||
| 30 | + | ||
| 27 | if ([self.title isEqualToString:@"更新手机号"]) { | 31 | if ([self.title isEqualToString:@"更新手机号"]) { |
| 28 | [self.view addSubview:self.registBasicInformationView]; | 32 | [self.view addSubview:self.registBasicInformationView]; |
| 29 | [self.view addSubview:self.verificationBtn]; | 33 | [self.view addSubview:self.verificationBtn]; |
| @@ -80,6 +84,7 @@ | @@ -80,6 +84,7 @@ | ||
| 80 | 84 | ||
| 81 | } failure:^(NSDictionary *errorDic) { | 85 | } failure:^(NSDictionary *errorDic) { |
| 82 | [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | 86 | [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; |
| 87 | + | ||
| 83 | }]; | 88 | }]; |
| 84 | } | 89 | } |
| 85 | 90 | ||
| @@ -155,12 +160,15 @@ | @@ -155,12 +160,15 @@ | ||
| 155 | { | 160 | { |
| 156 | if (!_saveBtn) { | 161 | if (!_saveBtn) { |
| 157 | _saveBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 162 | _saveBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 158 | - _saveBtn.backgroundColor = [UIColor orangeColor]; | ||
| 159 | [_saveBtn setFrame:CGRectMake(10, 250, KScreenWidth - 20, 40)]; | 163 | [_saveBtn setFrame:CGRectMake(10, 250, KScreenWidth - 20, 40)]; |
| 160 | - _saveBtn.layer.cornerRadius = 20; | ||
| 161 | - _saveBtn.layer.masksToBounds = YES; | ||
| 162 | [_saveBtn setTitle:@"保 存" forState:UIControlStateNormal]; | 164 | [_saveBtn setTitle:@"保 存" forState:UIControlStateNormal]; |
| 163 | [_saveBtn addTarget:self action:@selector(saveBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 165 | [_saveBtn addTarget:self action:@selector(saveBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 166 | + _saveBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 167 | + [_saveBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 168 | + _saveBtn.layer.cornerRadius = 20; | ||
| 169 | + _saveBtn.layer.masksToBounds = YES; | ||
| 170 | + _saveBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 171 | + _saveBtn.layer.borderWidth = 1; | ||
| 164 | } | 172 | } |
| 165 | return _saveBtn; | 173 | return _saveBtn; |
| 166 | } | 174 | } |
| @@ -178,11 +186,15 @@ | @@ -178,11 +186,15 @@ | ||
| 178 | if (!_verificationBtn) { | 186 | if (!_verificationBtn) { |
| 179 | _verificationBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 187 | _verificationBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 180 | [_verificationBtn setFrame:CGRectMake(KScreenWidth - 105, 80, 95, 37)]; | 188 | [_verificationBtn setFrame:CGRectMake(KScreenWidth - 105, 80, 95, 37)]; |
| 181 | - _verificationBtn.backgroundColor = [UIColor orangeColor]; | ||
| 182 | - _verificationBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 183 | [_verificationBtn setTitle:@"获取验证码" forState:UIControlStateNormal]; | 189 | [_verificationBtn setTitle:@"获取验证码" forState:UIControlStateNormal]; |
| 184 | [_verificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | 190 | [_verificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; |
| 185 | [_verificationBtn addTarget:self action:@selector(verificationBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 191 | [_verificationBtn addTarget:self action:@selector(verificationBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 192 | + _verificationBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 193 | + [_verificationBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 194 | + _verificationBtn.layer.cornerRadius = 10; | ||
| 195 | + _verificationBtn.layer.masksToBounds = YES; | ||
| 196 | + _verificationBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 197 | + _verificationBtn.layer.borderWidth = 1; | ||
| 186 | } | 198 | } |
| 187 | return _verificationBtn; | 199 | return _verificationBtn; |
| 188 | } | 200 | } |
CNLiveUserSystemDemo/Conreollers/RegisterViewController.m
| @@ -11,10 +11,10 @@ | @@ -11,10 +11,10 @@ | ||
| 11 | 11 | ||
| 12 | @interface RegisterViewController () | 12 | @interface RegisterViewController () |
| 13 | 13 | ||
| 14 | -@property (nonatomic, strong)RegistBasicInformationView *registBasicInformationView; | ||
| 15 | -@property (nonatomic, strong)UIButton *verificationBtn; | ||
| 16 | -@property (nonatomic, strong)UIButton *loginBtn; | ||
| 17 | - | 14 | +@property (nonatomic, strong) RegistBasicInformationView *registBasicInformationView; |
| 15 | +@property (nonatomic, strong) UIButton *verificationBtn; | ||
| 16 | +@property (nonatomic, strong) UIButton *loginBtn; | ||
| 17 | +@property (nonatomic, strong) dispatch_source_t timer; | ||
| 18 | 18 | ||
| 19 | @end | 19 | @end |
| 20 | 20 | ||
| @@ -22,6 +22,11 @@ | @@ -22,6 +22,11 @@ | ||
| 22 | 22 | ||
| 23 | - (void)viewDidLoad { | 23 | - (void)viewDidLoad { |
| 24 | [super viewDidLoad]; | 24 | [super viewDidLoad]; |
| 25 | + self.view.backgroundColor = [UIColor whiteColor]; | ||
| 26 | + | ||
| 27 | + UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init]; | ||
| 28 | + backItem.title = @"back"; | ||
| 29 | + self.navigationItem.backBarButtonItem = backItem; | ||
| 25 | 30 | ||
| 26 | if ([_type isEqualToString:@"register"]) { | 31 | if ([_type isEqualToString:@"register"]) { |
| 27 | self.title = @"注册"; | 32 | self.title = @"注册"; |
| @@ -31,7 +36,6 @@ | @@ -31,7 +36,6 @@ | ||
| 31 | self.title = @"修改密码"; | 36 | self.title = @"修改密码"; |
| 32 | } | 37 | } |
| 33 | 38 | ||
| 34 | - self.view.backgroundColor = [UIColor whiteColor]; | ||
| 35 | [self.view addSubview:self.registBasicInformationView]; | 39 | [self.view addSubview:self.registBasicInformationView]; |
| 36 | [self.view addSubview:self.verificationBtn]; | 40 | [self.view addSubview:self.verificationBtn]; |
| 37 | [self.view addSubview:self.loginBtn]; | 41 | [self.view addSubview:self.loginBtn]; |
| @@ -51,6 +55,9 @@ | @@ -51,6 +55,9 @@ | ||
| 51 | 55 | ||
| 52 | } failure:^(NSDictionary *errorDic) { | 56 | } failure:^(NSDictionary *errorDic) { |
| 53 | [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | 57 | [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; |
| 58 | + | ||
| 59 | + [self stopTimer]; | ||
| 60 | + | ||
| 54 | }]; | 61 | }]; |
| 55 | 62 | ||
| 56 | } else if ([_type isEqualToString:@"quicklyLogin"]) { | 63 | } else if ([_type isEqualToString:@"quicklyLogin"]) { |
| @@ -61,6 +68,9 @@ | @@ -61,6 +68,9 @@ | ||
| 61 | 68 | ||
| 62 | } failure:^(NSDictionary *errorDic) { | 69 | } failure:^(NSDictionary *errorDic) { |
| 63 | [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | 70 | [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; |
| 71 | + | ||
| 72 | + [self stopTimer]; | ||
| 73 | + | ||
| 64 | }]; | 74 | }]; |
| 65 | 75 | ||
| 66 | } else { | 76 | } else { |
| @@ -71,10 +81,20 @@ | @@ -71,10 +81,20 @@ | ||
| 71 | 81 | ||
| 72 | } failure:^(NSDictionary *errorDic) { | 82 | } failure:^(NSDictionary *errorDic) { |
| 73 | [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | 83 | [Tools toast:[NSString stringWithFormat:@"errorCode : %@ \n errorMessage : %@", errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; |
| 84 | + | ||
| 85 | + [self stopTimer]; | ||
| 74 | }]; | 86 | }]; |
| 75 | } | 87 | } |
| 76 | } | 88 | } |
| 77 | 89 | ||
| 90 | +- (void)stopTimer | ||
| 91 | +{ | ||
| 92 | + [self.verificationBtn setTitle:@"发送验证码" forState:UIControlStateNormal]; | ||
| 93 | + self.verificationBtn.userInteractionEnabled = YES; | ||
| 94 | + dispatch_cancel(self.timer); | ||
| 95 | + self.timer = nil; | ||
| 96 | +} | ||
| 97 | + | ||
| 78 | - (void)loginBtnAction | 98 | - (void)loginBtnAction |
| 79 | { | 99 | { |
| 80 | 100 | ||
| @@ -130,7 +150,7 @@ | @@ -130,7 +150,7 @@ | ||
| 130 | 150 | ||
| 131 | dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | 151 | dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); |
| 132 | 152 | ||
| 133 | - dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue); | 153 | + self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue); |
| 134 | 154 | ||
| 135 | dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行 | 155 | dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行 |
| 136 | 156 | ||
| @@ -145,15 +165,12 @@ | @@ -145,15 +165,12 @@ | ||
| 145 | //设置界面的按钮显示 根据自己需求设置 | 165 | //设置界面的按钮显示 根据自己需求设置 |
| 146 | 166 | ||
| 147 | [self.verificationBtn setTitle:@"发送验证码" forState:UIControlStateNormal]; | 167 | [self.verificationBtn setTitle:@"发送验证码" forState:UIControlStateNormal]; |
| 148 | - | ||
| 149 | self.verificationBtn.userInteractionEnabled = YES; | 168 | self.verificationBtn.userInteractionEnabled = YES; |
| 150 | 169 | ||
| 151 | }); | 170 | }); |
| 152 | 171 | ||
| 153 | }else{ | 172 | }else{ |
| 154 | 173 | ||
| 155 | - // int minutes = timeout / 60; | ||
| 156 | - | ||
| 157 | int seconds = timeout % 60; | 174 | int seconds = timeout % 60; |
| 158 | 175 | ||
| 159 | NSString *strTime = [NSString stringWithFormat:@"%.2d", seconds]; | 176 | NSString *strTime = [NSString stringWithFormat:@"%.2d", seconds]; |
| @@ -201,11 +218,15 @@ | @@ -201,11 +218,15 @@ | ||
| 201 | if (!_verificationBtn) { | 218 | if (!_verificationBtn) { |
| 202 | _verificationBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 219 | _verificationBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 203 | [_verificationBtn setFrame:CGRectMake(KScreenWidth - 105, 80, 95, 37)]; | 220 | [_verificationBtn setFrame:CGRectMake(KScreenWidth - 105, 80, 95, 37)]; |
| 204 | - _verificationBtn.backgroundColor = [UIColor orangeColor]; | ||
| 205 | - _verificationBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 206 | [_verificationBtn setTitle:@"获取验证码" forState:UIControlStateNormal]; | 221 | [_verificationBtn setTitle:@"获取验证码" forState:UIControlStateNormal]; |
| 207 | [_verificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | 222 | [_verificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; |
| 208 | [_verificationBtn addTarget:self action:@selector(verificationBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 223 | [_verificationBtn addTarget:self action:@selector(verificationBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 224 | + _verificationBtn.titleLabel.font = [UIFont systemFontOfSize:15]; | ||
| 225 | + [_verificationBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 226 | + _verificationBtn.layer.cornerRadius = 10; | ||
| 227 | + _verificationBtn.layer.masksToBounds = YES; | ||
| 228 | + _verificationBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 229 | + _verificationBtn.layer.borderWidth = 1; | ||
| 209 | } | 230 | } |
| 210 | return _verificationBtn; | 231 | return _verificationBtn; |
| 211 | } | 232 | } |
| @@ -214,10 +235,7 @@ | @@ -214,10 +235,7 @@ | ||
| 214 | { | 235 | { |
| 215 | if (!_loginBtn) { | 236 | if (!_loginBtn) { |
| 216 | _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 237 | _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 217 | - _loginBtn.backgroundColor = [UIColor orangeColor]; | ||
| 218 | [_loginBtn setFrame:CGRectMake(10, 280, KScreenWidth - 20, 40)]; | 238 | [_loginBtn setFrame:CGRectMake(10, 280, KScreenWidth - 20, 40)]; |
| 219 | - _loginBtn.layer.cornerRadius = 20; | ||
| 220 | - _loginBtn.layer.masksToBounds = YES; | ||
| 221 | if ([_type isEqualToString:@"register"]) { | 239 | if ([_type isEqualToString:@"register"]) { |
| 222 | [_loginBtn setTitle:@"注 册" forState:UIControlStateNormal]; | 240 | [_loginBtn setTitle:@"注 册" forState:UIControlStateNormal]; |
| 223 | } else if ([_type isEqualToString:@"quicklyLogin"]) { | 241 | } else if ([_type isEqualToString:@"quicklyLogin"]) { |
| @@ -226,6 +244,12 @@ | @@ -226,6 +244,12 @@ | ||
| 226 | [_loginBtn setTitle:@"确 认" forState:UIControlStateNormal]; | 244 | [_loginBtn setTitle:@"确 认" forState:UIControlStateNormal]; |
| 227 | } | 245 | } |
| 228 | [_loginBtn addTarget:self action:@selector(loginBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 246 | [_loginBtn addTarget:self action:@selector(loginBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 247 | + _loginBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 248 | + [_loginBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 249 | + _loginBtn.layer.cornerRadius = 20; | ||
| 250 | + _loginBtn.layer.masksToBounds = YES; | ||
| 251 | + _loginBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 252 | + _loginBtn.layer.borderWidth = 1; | ||
| 229 | } | 253 | } |
| 230 | return _loginBtn; | 254 | return _loginBtn; |
| 231 | } | 255 | } |
CNLiveUserSystemDemo/Conreollers/UserInfoViewController.m
| @@ -27,6 +27,11 @@ | @@ -27,6 +27,11 @@ | ||
| 27 | - (void)viewDidLoad { | 27 | - (void)viewDidLoad { |
| 28 | [super viewDidLoad]; | 28 | [super viewDidLoad]; |
| 29 | self.view.backgroundColor = [UIColor whiteColor]; | 29 | self.view.backgroundColor = [UIColor whiteColor]; |
| 30 | + | ||
| 31 | + UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init]; | ||
| 32 | + backItem.title = @"back"; | ||
| 33 | + self.navigationItem.backBarButtonItem = backItem; | ||
| 34 | + | ||
| 30 | self.title = @"个人资料"; | 35 | self.title = @"个人资料"; |
| 31 | 36 | ||
| 32 | _titlesArray = @[@"头像", @"更新手机号", @"昵称修改", @"性别修改", @"邮箱修改",@"地址修改"]; | 37 | _titlesArray = @[@"头像", @"更新手机号", @"昵称修改", @"性别修改", @"邮箱修改",@"地址修改"]; |
CNLiveUserSystemDemo/Conreollers/ViewController.m
| @@ -29,18 +29,26 @@ | @@ -29,18 +29,26 @@ | ||
| 29 | 29 | ||
| 30 | - (void)viewDidLoad { | 30 | - (void)viewDidLoad { |
| 31 | [super viewDidLoad]; | 31 | [super viewDidLoad]; |
| 32 | - self.title = @"用户云"; | 32 | + self.title = @"用户云 SDK Demo"; |
| 33 | self.view.backgroundColor = [UIColor whiteColor]; | 33 | self.view.backgroundColor = [UIColor whiteColor]; |
| 34 | 34 | ||
| 35 | + UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init]; | ||
| 36 | + backItem.title = @"back"; | ||
| 37 | + self.navigationItem.backBarButtonItem = backItem; | ||
| 38 | + | ||
| 39 | + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetHeight([UIScreen mainScreen].bounds)-40, CGRectGetWidth(self.view.frame), 30)]; | ||
| 40 | + label.text = @"北京中投视讯文化传媒股份有限公司"; | ||
| 41 | + [self.view addSubview:label]; | ||
| 42 | + label.font = [UIFont systemFontOfSize:12]; | ||
| 43 | + label.textAlignment = NSTextAlignmentCenter; | ||
| 44 | + | ||
| 45 | + [self.view addSubview:label]; | ||
| 35 | [self.view addSubview:self.tableView]; | 46 | [self.view addSubview:self.tableView]; |
| 36 | [self.view addSubview:self.loginBtn]; | 47 | [self.view addSubview:self.loginBtn]; |
| 37 | [self.view addSubview:self.thirPartydView]; | 48 | [self.view addSubview:self.thirPartydView]; |
| 38 | 49 | ||
| 39 | -// UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGesturedDetected:)]; // 手势类型随你喜欢。 | ||
| 40 | -// tapGesture.delegate = self; | ||
| 41 | -// [self.view addGestureRecognizer:tapGesture]; | ||
| 42 | - | ||
| 43 | _dataArr = @[@"通过手机号修改密码",@"更新附加信息",@"修改用户信息",@"查询用户信息",@"反馈",@"绑定第三方账号"]; | 50 | _dataArr = @[@"通过手机号修改密码",@"更新附加信息",@"修改用户信息",@"查询用户信息",@"反馈",@"绑定第三方账号"]; |
| 51 | + | ||
| 44 | } | 52 | } |
| 45 | 53 | ||
| 46 | - (void)viewWillAppear:(BOOL)animated | 54 | - (void)viewWillAppear:(BOOL)animated |
| @@ -117,11 +125,12 @@ | @@ -117,11 +125,12 @@ | ||
| 117 | UITableViewCell *loginCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cellID"]; | 125 | UITableViewCell *loginCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cellID"]; |
| 118 | 126 | ||
| 119 | UIImageView *iconImg = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 80, 80)]; | 127 | UIImageView *iconImg = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 80, 80)]; |
| 120 | - iconImg.backgroundColor = [UIColor orangeColor]; | 128 | + iconImg.layer.cornerRadius = 40; |
| 129 | + iconImg.layer.masksToBounds = YES; | ||
| 121 | [loginCell.contentView addSubview:iconImg]; | 130 | [loginCell.contentView addSubview:iconImg]; |
| 122 | UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; | 131 | UserInfoModel *model = [UserInfoModel modelWithKeyValues:[Tools getLocalUserInfo]]; |
| 123 | 132 | ||
| 124 | - [iconImg sd_setImageWithURL:[NSURL URLWithString:model.faceUrl] placeholderImage:[UIImage imageNamed:@""]]; | 133 | + [iconImg sd_setImageWithURL:[NSURL URLWithString:model.faceUrl] placeholderImage:[UIImage imageNamed:@"touxiang"]]; |
| 125 | 134 | ||
| 126 | UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(120, 0, KScreenWidth- 160, 120)]; | 135 | UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(120, 0, KScreenWidth- 160, 120)]; |
| 127 | if ([Tools isLogin]) { | 136 | if ([Tools isLogin]) { |
| @@ -231,7 +240,7 @@ | @@ -231,7 +240,7 @@ | ||
| 231 | - (UITableView *)tableView | 240 | - (UITableView *)tableView |
| 232 | { | 241 | { |
| 233 | if (!_tableView) { | 242 | if (!_tableView) { |
| 234 | - _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight -80) style:UITableViewStylePlain]; | 243 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 64, KScreenWidth, KScreenHeight - 120 - 64) style:UITableViewStylePlain]; |
| 235 | _tableView.backgroundColor = [UIColor whiteColor]; | 244 | _tableView.backgroundColor = [UIColor whiteColor]; |
| 236 | _tableView.tableFooterView = [[UIView alloc] init]; | 245 | _tableView.tableFooterView = [[UIView alloc] init]; |
| 237 | _tableView.delegate = self; | 246 | _tableView.delegate = self; |
| @@ -252,13 +261,16 @@ | @@ -252,13 +261,16 @@ | ||
| 252 | { | 261 | { |
| 253 | if (!_loginBtn) { | 262 | if (!_loginBtn) { |
| 254 | _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 263 | _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 255 | - _loginBtn.frame = CGRectMake(20, KScreenHeight-60, KScreenWidth-40, 40); | 264 | + _loginBtn.frame = CGRectMake(20, KScreenHeight-100, KScreenWidth-40, 40); |
| 256 | [_loginBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | 265 | [_loginBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; |
| 257 | - [_loginBtn setBackgroundColor:[UIColor orangeColor]]; | ||
| 258 | _loginBtn.titleLabel.font = [UIFont systemFontOfSize:17]; | 266 | _loginBtn.titleLabel.font = [UIFont systemFontOfSize:17]; |
| 259 | [_loginBtn addTarget:self action:@selector(logoutBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 267 | [_loginBtn addTarget:self action:@selector(logoutBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 268 | + _loginBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 269 | + [_loginBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 260 | _loginBtn.layer.cornerRadius = 20; | 270 | _loginBtn.layer.cornerRadius = 20; |
| 261 | _loginBtn.layer.masksToBounds = YES; | 271 | _loginBtn.layer.masksToBounds = YES; |
| 272 | + _loginBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 273 | + _loginBtn.layer.borderWidth = 1; | ||
| 262 | } | 274 | } |
| 263 | return _loginBtn; | 275 | return _loginBtn; |
| 264 | } | 276 | } |
CNLiveUserSystemDemo/Views/ThirdPartyView.m
| @@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
| 25 | { | 25 | { |
| 26 | self = [super initWithFrame:frame]; | 26 | self = [super initWithFrame:frame]; |
| 27 | if (self) { | 27 | if (self) { |
| 28 | - self.backgroundColor = [UIColor blackColor]; | 28 | + self.backgroundColor = [UIColor whiteColor]; |
| 29 | [self addSubview:self.sinaBtn]; | 29 | [self addSubview:self.sinaBtn]; |
| 30 | [self addSubview:self.qqBtn]; | 30 | [self addSubview:self.qqBtn]; |
| 31 | [self addSubview:self.weChatBtn]; | 31 | [self addSubview:self.weChatBtn]; |
| @@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
| 60 | if (!_thirdpartyLoginLbl) { | 60 | if (!_thirdpartyLoginLbl) { |
| 61 | _thirdpartyLoginLbl = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, KScreenWidth, 15)]; | 61 | _thirdpartyLoginLbl = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, KScreenWidth, 15)]; |
| 62 | _thirdpartyLoginLbl.textAlignment = NSTextAlignmentCenter; | 62 | _thirdpartyLoginLbl.textAlignment = NSTextAlignmentCenter; |
| 63 | - _thirdpartyLoginLbl.textColor = [UIColor orangeColor]; | 63 | + _thirdpartyLoginLbl.textColor = [UIColor blackColor]; |
| 64 | _thirdpartyLoginLbl.text = @"第三方平台"; | 64 | _thirdpartyLoginLbl.text = @"第三方平台"; |
| 65 | _thirdpartyLoginLbl.font = [UIFont systemFontOfSize:15]; | 65 | _thirdpartyLoginLbl.font = [UIFont systemFontOfSize:15]; |
| 66 | } | 66 | } |
| @@ -71,12 +71,15 @@ | @@ -71,12 +71,15 @@ | ||
| 71 | { | 71 | { |
| 72 | if (!_weChatBtn) { | 72 | if (!_weChatBtn) { |
| 73 | _weChatBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 73 | _weChatBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 74 | - _weChatBtn.backgroundColor = [UIColor orangeColor]; | ||
| 75 | [_weChatBtn setFrame:CGRectMake(SpaceWidth, 70, 80, 40)]; | 74 | [_weChatBtn setFrame:CGRectMake(SpaceWidth, 70, 80, 40)]; |
| 76 | - _weChatBtn.layer.cornerRadius = 20; | ||
| 77 | - _weChatBtn.layer.masksToBounds = YES; | ||
| 78 | [_weChatBtn setTitle:@"微信" forState:UIControlStateNormal]; | 75 | [_weChatBtn setTitle:@"微信" forState:UIControlStateNormal]; |
| 79 | [_weChatBtn addTarget:self action:@selector(thirdPartyBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | 76 | [_weChatBtn addTarget:self action:@selector(thirdPartyBtnAction:) forControlEvents:UIControlEventTouchUpInside]; |
| 77 | + _weChatBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 78 | + [_weChatBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 79 | + _weChatBtn.layer.cornerRadius = 20; | ||
| 80 | + _weChatBtn.layer.masksToBounds = YES; | ||
| 81 | + _weChatBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 82 | + _weChatBtn.layer.borderWidth = 1; | ||
| 80 | } | 83 | } |
| 81 | return _weChatBtn; | 84 | return _weChatBtn; |
| 82 | } | 85 | } |
| @@ -85,12 +88,15 @@ | @@ -85,12 +88,15 @@ | ||
| 85 | { | 88 | { |
| 86 | if (!_sinaBtn) { | 89 | if (!_sinaBtn) { |
| 87 | _sinaBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 90 | _sinaBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 88 | - _sinaBtn.backgroundColor = [UIColor orangeColor]; | ||
| 89 | [_sinaBtn setFrame:CGRectMake(SpaceWidth*2+80, 70, 80, 40)]; | 91 | [_sinaBtn setFrame:CGRectMake(SpaceWidth*2+80, 70, 80, 40)]; |
| 90 | - _sinaBtn.layer.cornerRadius = 20; | ||
| 91 | - _sinaBtn.layer.masksToBounds = YES; | ||
| 92 | [_sinaBtn setTitle:@"微博" forState:UIControlStateNormal]; | 92 | [_sinaBtn setTitle:@"微博" forState:UIControlStateNormal]; |
| 93 | [_sinaBtn addTarget:self action:@selector(thirdPartyBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | 93 | [_sinaBtn addTarget:self action:@selector(thirdPartyBtnAction:) forControlEvents:UIControlEventTouchUpInside]; |
| 94 | + _sinaBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 95 | + [_sinaBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 96 | + _sinaBtn.layer.cornerRadius = 20; | ||
| 97 | + _sinaBtn.layer.masksToBounds = YES; | ||
| 98 | + _sinaBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 99 | + _sinaBtn.layer.borderWidth = 1; | ||
| 94 | } | 100 | } |
| 95 | return _sinaBtn; | 101 | return _sinaBtn; |
| 96 | } | 102 | } |
| @@ -99,12 +105,15 @@ | @@ -99,12 +105,15 @@ | ||
| 99 | { | 105 | { |
| 100 | if (!_qqBtn) { | 106 | if (!_qqBtn) { |
| 101 | _qqBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | 107 | _qqBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 102 | - _qqBtn.backgroundColor = [UIColor orangeColor]; | ||
| 103 | [_qqBtn setFrame:CGRectMake(SpaceWidth*3+80*2, 70, 80, 40)]; | 108 | [_qqBtn setFrame:CGRectMake(SpaceWidth*3+80*2, 70, 80, 40)]; |
| 104 | - _qqBtn.layer.cornerRadius = 20; | ||
| 105 | - _qqBtn.layer.masksToBounds = YES; | ||
| 106 | [_qqBtn setTitle:@"QQ" forState:UIControlStateNormal]; | 109 | [_qqBtn setTitle:@"QQ" forState:UIControlStateNormal]; |
| 107 | [_qqBtn addTarget:self action:@selector(thirdPartyBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | 110 | [_qqBtn addTarget:self action:@selector(thirdPartyBtnAction:) forControlEvents:UIControlEventTouchUpInside]; |
| 111 | + _qqBtn.titleLabel.font = [UIFont systemFontOfSize:18]; | ||
| 112 | + [_qqBtn setTitleColor:[UIColor colorWithRed:23/255.0 green:110/255.0 blue:254/255.0 alpha:1] forState:UIControlStateNormal]; | ||
| 113 | + _qqBtn.layer.cornerRadius = 20; | ||
| 114 | + _qqBtn.layer.masksToBounds = YES; | ||
| 115 | + _qqBtn.layer.borderColor = [UIColor blackColor].CGColor; | ||
| 116 | + _qqBtn.layer.borderWidth = 1; | ||
| 108 | } | 117 | } |
| 109 | return _qqBtn; | 118 | return _qqBtn; |
| 110 | } | 119 | } |
CNLiveUserSystemDemo/touxiang.png
0 → 100644
6.29 KB
CNLiveUserSystemSDK.xcodeproj/project.xcworkspace/xcuserdata/iOS.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type