Commit d62e731050391b1c8eceeac1043fd901f122176c
1 parent
1862ee7f
直播页面pop到指定控制器
Showing
1 changed file
with
14 additions
and
3 deletions
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLivePlayerController.m
| @@ -12,6 +12,8 @@ | @@ -12,6 +12,8 @@ | ||
| 12 | #import "LVCUGCBackgroundView.h" | 12 | #import "LVCUGCBackgroundView.h" |
| 13 | #import "UIImage+LVCVagueImage.h" | 13 | #import "UIImage+LVCVagueImage.h" |
| 14 | #import "LiveBaseView.h" | 14 | #import "LiveBaseView.h" |
| 15 | +#import "MineLiveController.h" | ||
| 16 | +#import "HomeViewController.h" | ||
| 15 | 17 | ||
| 16 | 18 | ||
| 17 | @interface LVCUGCLivePlayerController () { | 19 | @interface LVCUGCLivePlayerController () { |
| @@ -109,10 +111,19 @@ | @@ -109,10 +111,19 @@ | ||
| 109 | - (void)quitBtnClick { // 退出 | 111 | - (void)quitBtnClick { // 退出 |
| 110 | 112 | ||
| 111 | [_player stop]; | 113 | [_player stop]; |
| 112 | - if (self.navigationController.viewControllers.count > 2) {//判断 | ||
| 113 | - [self.navigationController popViewControllerAnimated:YES]; | 114 | +// if (self.navigationController.viewControllers.count > 2) {//判断 |
| 115 | +// [self.navigationController popViewControllerAnimated:YES]; | ||
| 116 | +// } | ||
| 117 | + | ||
| 118 | + for (UIViewController *controller in self.navigationController.viewControllers) { | ||
| 119 | + if ([controller isKindOfClass:[MineLiveController class]]) { | ||
| 120 | + MineLiveController *revise =(MineLiveController *)controller; | ||
| 121 | + [self.navigationController popToViewController:revise animated:YES]; | ||
| 122 | + } else if ([controller isKindOfClass:[HomeViewController class]]) { | ||
| 123 | + HomeViewController *revise =(HomeViewController *)controller; | ||
| 124 | + [self.navigationController popToViewController:revise animated:YES]; | ||
| 125 | + } | ||
| 114 | } | 126 | } |
| 115 | - | ||
| 116 | } | 127 | } |
| 117 | 128 | ||
| 118 | - (void)setModel:(LVCUGCLivePlayerModel *)model { | 129 | - (void)setModel:(LVCUGCLivePlayerModel *)model { |