File tree Expand file tree Collapse file tree 3 files changed +31
-18
lines changed
AR-iOS-Video-Base/AR-iOS-Video-Base Expand file tree Collapse file tree 3 files changed +31
-18
lines changed Original file line number Diff line number Diff line change 20
20
<string >1 </string >
21
21
<key >LSRequiresIPhoneOS </key >
22
22
<true />
23
+ <key >NSAppTransportSecurity </key >
24
+ <dict >
25
+ <key >NSAllowsArbitraryLoads </key >
26
+ <true />
27
+ </dict >
28
+ <key >NSCameraUsageDescription </key >
29
+ <string >Camera for a call </string >
30
+ <key >NSMicrophoneUsageDescription </key >
31
+ <string >Microphone for a call </string >
23
32
<key >UIApplicationSupportsIndirectInputEvents </key >
24
33
<true />
25
34
<key >UILaunchStoryboardName </key >
32
41
</array >
33
42
<key >UIStatusBarStyle </key >
34
43
<string >UIStatusBarStyleLightContent </string >
35
- <key >NSAppTransportSecurity </key >
36
- <dict >
37
- <key >NSAllowsArbitraryLoads </key >
38
- <true />
39
- </dict >
40
- <key >NSCameraUsageDescription </key >
41
- <string >Camera for a call </string >
42
- <key >NSMicrophoneUsageDescription </key >
43
- <string >Microphone for a call </string >
44
44
<key >UISupportedInterfaceOrientations </key >
45
45
<array >
46
46
<string >UIInterfaceOrientationPortrait </string >
47
- <string >UIInterfaceOrientationLandscapeLeft </string >
48
- <string >UIInterfaceOrientationLandscapeRight </string >
49
47
</array >
50
48
<key >UISupportedInterfaceOrientations~ipad </key >
51
49
<array >
Original file line number Diff line number Diff line change @@ -29,11 +29,21 @@ - (void)viewDidLoad {
29
29
30
30
- (IBAction )JoinChannelAction : (id )sender {
31
31
[self .view endEditing: YES ];
32
- UIStoryboard *sb = [UIStoryboard storyboardWithName: @" Main" bundle: [NSBundle mainBundle ]];
33
- RoomViewController *vc = [sb instantiateViewControllerWithIdentifier: @" RoomViewController" ];
34
- vc.userId = _uid;
35
- vc.channelId = self.channelTF .text ;
36
- [self .navigationController pushViewController: vc animated: YES ];
32
+
33
+ if ([self .channelTF.text isEqualToString: @" " ]) {
34
+ UIAlertController *alert = [UIAlertController alertControllerWithTitle: @" 提示" message: @" 频道id不能为空" preferredStyle: UIAlertControllerStyleAlert];
35
+ UIAlertAction *sureAction = [UIAlertAction actionWithTitle: @" 确认" style: UIAlertActionStyleDefault handler: ^(UIAlertAction * _Nonnull action) {
36
+
37
+ }];
38
+ [alert addAction: sureAction];
39
+ [self presentViewController: alert animated: YES completion: nil ];
40
+ } else {
41
+ UIStoryboard *sb = [UIStoryboard storyboardWithName: @" Main" bundle: [NSBundle mainBundle ]];
42
+ RoomViewController *vc = [sb instantiateViewControllerWithIdentifier: @" RoomViewController" ];
43
+ vc.userId = _uid;
44
+ vc.channelId = self.channelTF .text ;
45
+ [self .navigationController pushViewController: vc animated: YES ];
46
+ }
37
47
}
38
48
39
49
Original file line number Diff line number Diff line change 5
5
// Created by anyRTC on 2021/1/26.
6
6
//
7
7
8
- #define APPID @" 177e21c0d1641291c34e46e1198bd49a "
8
+ #define APPID @" "
9
9
10
10
#import " RoomViewController.h"
11
11
#import " VideoShowCell.h"
@@ -36,9 +36,14 @@ - (void)viewDidLoad {
36
36
// [self.engineKit setEnableSpeakerphone:YES];
37
37
}
38
38
39
+ -(void )viewDidDisappear : (BOOL )animated {
40
+ [super viewDidDisappear: animated];
41
+ [self .engineKit leaveChannel: nil ];
42
+ self.engineKit .delegate = nil ;
43
+ self.engineKit = nil ;
44
+ }
39
45
40
46
- (void )initUI {
41
-
42
47
[self .collection registerNib: [UINib nibWithNibName: NSStringFromClass ([VideoShowCell class ]) bundle: [NSBundle mainBundle ]] forCellWithReuseIdentifier: NSStringFromClass ([VideoShowCell class ])];
43
48
44
49
[self .micBtn setImage: IMG (@" img_audio_open" ) forState: UIControlStateNormal];
You can’t perform that action at this time.
0 commit comments