Commit d2196468280e9c89a5394523daaa6529a02636bb
1 parent
628ff3e3
音视频后台展示播放问题修改
Showing
3 changed files
with
8 additions
and
1 deletions
CNLiveScioLive/AppDelegate.m
| @@ -193,6 +193,7 @@ | @@ -193,6 +193,7 @@ | ||
| 193 | 193 | ||
| 194 | 194 | ||
| 195 | - (void)applicationDidEnterBackground:(UIApplication *)application { | 195 | - (void)applicationDidEnterBackground:(UIApplication *)application { |
| 196 | + [[NSNotificationCenter defaultCenter] postNotificationName:RESIGNACTIVE object:nil]; | ||
| 196 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. | 197 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. |
| 197 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | 198 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. |
| 198 | } | 199 | } |
| @@ -228,7 +229,7 @@ | @@ -228,7 +229,7 @@ | ||
| 228 | 229 | ||
| 229 | - (void)applicationDidBecomeActive:(UIApplication *)application { | 230 | - (void)applicationDidBecomeActive:(UIApplication *)application { |
| 230 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. | 231 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. |
| 231 | - | 232 | + [[NSNotificationCenter defaultCenter] postNotificationName:BECOMEACTIVE object:nil]; |
| 232 | if (self.isPush) { | 233 | if (self.isPush) { |
| 233 | if([self.window.rootViewController isKindOfClass:[XLSlideMenu class]]){ | 234 | if([self.window.rootViewController isKindOfClass:[XLSlideMenu class]]){ |
| 234 | XLSlideMenu *menu = (XLSlideMenu *)self.window.rootViewController; | 235 | XLSlideMenu *menu = (XLSlideMenu *)self.window.rootViewController; |
CNLiveScioLive/Pages/Header/SystemMacro.h
| @@ -151,4 +151,8 @@ NO) | @@ -151,4 +151,8 @@ NO) | ||
| 151 | #define leftImageCellWidth (MainScreenWidth*3/8) | 151 | #define leftImageCellWidth (MainScreenWidth*3/8) |
| 152 | #define threeImageCellWidth ((cellItemWidth - 16)/3) | 152 | #define threeImageCellWidth ((cellItemWidth - 16)/3) |
| 153 | 153 | ||
| 154 | +//通知 | ||
| 155 | +#define RESIGNACTIVE @"resignActive" | ||
| 156 | +#define BECOMEACTIVE @"becomeActive" | ||
| 157 | + | ||
| 154 | #endif /* SystemMacro_h */ | 158 | #endif /* SystemMacro_h */ |
CNLiveScioLive/Pages/Tools/CNLivePlayer/CNLivePlayerController.m
No preview for this file type