Commit 9fe14823a14a36462ca4dd79803639d9e5b95539
Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/LiveVideoCloud
Showing
4 changed files
with
24 additions
and
11 deletions
LiveVideoCloud/AppCustoms/Main/View/LVCTabBar.m
| @@ -43,13 +43,15 @@ | @@ -43,13 +43,15 @@ | ||
| 43 | { | 43 | { |
| 44 | [super layoutSubviews]; | 44 | [super layoutSubviews]; |
| 45 | 45 | ||
| 46 | - self.liveBtn.top = self.height - 96 / 2; | ||
| 47 | - _liveBtn.left = SCREEN_WIDTH * 0.5 - 96 / 4; | ||
| 48 | - _liveBtn.width = 96 / 2; | ||
| 49 | - _liveBtn.height = 96 / 2; | 46 | + CGFloat liveW = 96 / 2; |
| 47 | + CGFloat liveH = 96 / 2; | ||
| 48 | + self.liveBtn.top = self.height - liveH; | ||
| 49 | + _liveBtn.left = SCREEN_WIDTH * 0.5 - liveW / 2; | ||
| 50 | + _liveBtn.width = liveW; | ||
| 51 | + _liveBtn.height = liveH; | ||
| 50 | 52 | ||
| 51 | CGFloat buttonY = 19 - 3;//19 - 3.5; | 53 | CGFloat buttonY = 19 - 3;//19 - 3.5; |
| 52 | - CGFloat buttonW = (self.width - 96 / 2)/ 4; | 54 | + CGFloat buttonW = (self.width - liveW)/ 4; |
| 53 | CGFloat buttonH = 30; | 55 | CGFloat buttonH = 30; |
| 54 | 56 | ||
| 55 | NSInteger index = 0; | 57 | NSInteger index = 0; |
| @@ -59,7 +61,7 @@ | @@ -59,7 +61,7 @@ | ||
| 59 | CGFloat buttonX = index * buttonW; | 61 | CGFloat buttonX = index * buttonW; |
| 60 | if (index >= 2) | 62 | if (index >= 2) |
| 61 | { | 63 | { |
| 62 | - buttonX += 96 / 2; | 64 | + buttonX += liveW; |
| 63 | } | 65 | } |
| 64 | 66 | ||
| 65 | subView.frame = CGRectMake(buttonX, buttonY, buttonW, buttonH); | 67 | subView.frame = CGRectMake(buttonX, buttonY, buttonW, buttonH); |
LiveVideoCloud/Classes/Sections/Mine/Login/Controller/LoginViewController.m
| @@ -89,14 +89,25 @@ | @@ -89,14 +89,25 @@ | ||
| 89 | 89 | ||
| 90 | [UserTools saveUserinfoDic:result[@"data"]]; | 90 | [UserTools saveUserinfoDic:result[@"data"]]; |
| 91 | [SVProgressHUD dismiss]; | 91 | [SVProgressHUD dismiss]; |
| 92 | - | 92 | + |
| 93 | + NSString *uId = result[@"data"][@"uid"]; | ||
| 94 | + NSString *name = result[@"data"][@"nickName"]; | ||
| 95 | + NSString *protrait = result[@"data"][@"faceUrl"]; | ||
| 96 | + //断开聊天SDK连接,以用户信息登录 | ||
| 97 | + [[CNLiveChatManager sharedCNLiveChatManager] logoutServer]; | ||
| 98 | + CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:uId name:name portrait:protrait]; | ||
| 99 | + [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) { | ||
| 100 | + NSLog(@"login CNLiveChat Success"); | ||
| 101 | + } error:^(CNLiveChatConnectErrorCode errors) { | ||
| 102 | + NSLog(@"login error %zd",errors); | ||
| 103 | + }]; | ||
| 104 | + | ||
| 93 | if(self.isModalButton) { | 105 | if(self.isModalButton) { |
| 94 | [self dismissViewControllerAnimated:YES completion:NULL]; | 106 | [self dismissViewControllerAnimated:YES completion:NULL]; |
| 95 | } else { | 107 | } else { |
| 96 | [self.navigationController popViewControllerAnimated:YES]; | 108 | [self.navigationController popViewControllerAnimated:YES]; |
| 97 | } | 109 | } |
| 98 | - | ||
| 99 | - | 110 | + |
| 100 | } else { | 111 | } else { |
| 101 | [SVProgressHUD dismiss]; | 112 | [SVProgressHUD dismiss]; |
| 102 | [SVProgressHUD setMinimumDismissTimeInterval:1.0]; | 113 | [SVProgressHUD setMinimumDismissTimeInterval:1.0]; |
LiveVideoCloud/animation.xcassets/tabBar/ic_camera.imageset/Contents.json
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | "images" : [ | 2 | "images" : [ |
| 3 | { | 3 | { |
| 4 | "idiom" : "universal", | 4 | "idiom" : "universal", |
| 5 | + "filename" : "ic_camera.png", | ||
| 5 | "scale" : "1x" | 6 | "scale" : "1x" |
| 6 | }, | 7 | }, |
| 7 | { | 8 | { |
| @@ -10,7 +11,6 @@ | @@ -10,7 +11,6 @@ | ||
| 10 | }, | 11 | }, |
| 11 | { | 12 | { |
| 12 | "idiom" : "universal", | 13 | "idiom" : "universal", |
| 13 | - "filename" : "ic_camera.png", | ||
| 14 | "scale" : "3x" | 14 | "scale" : "3x" |
| 15 | } | 15 | } |
| 16 | ], | 16 | ], |
LiveVideoCloud/animation.xcassets/tabBar/ic_camera_sel.imageset/Contents.json
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | "images" : [ | 2 | "images" : [ |
| 3 | { | 3 | { |
| 4 | "idiom" : "universal", | 4 | "idiom" : "universal", |
| 5 | + "filename" : "ic_camera_sel.png", | ||
| 5 | "scale" : "1x" | 6 | "scale" : "1x" |
| 6 | }, | 7 | }, |
| 7 | { | 8 | { |
| @@ -10,7 +11,6 @@ | @@ -10,7 +11,6 @@ | ||
| 10 | }, | 11 | }, |
| 11 | { | 12 | { |
| 12 | "idiom" : "universal", | 13 | "idiom" : "universal", |
| 13 | - "filename" : "ic_camera_sel.png", | ||
| 14 | "scale" : "3x" | 14 | "scale" : "3x" |
| 15 | } | 15 | } |
| 16 | ], | 16 | ], |