forked from LiteAVSDK/Player_iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
annidyfeng
committed
Sep 20, 2018
1 parent
448f699
commit 1a0eaa7
Showing
18 changed files
with
228 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
Pod::Spec.new do |spec| | ||
spec.name = 'SuperPlayer' | ||
spec.version = '1.0.3' | ||
spec.version = '1.0.4' | ||
spec.license = { :type => 'MIT' } | ||
spec.homepage = 'https://cloud.tencent.com/product/mlvb' | ||
spec.authors = { 'annidyfeng' => '[email protected]' } | ||
spec.summary = 'Tencent Cloud Player' | ||
spec.source = { :git => 'https://github.com/tencentyun/SuperPlayer.git', :tag => 'v1.0.3' } | ||
spec.source = { :git => 'https://github.com/tencentyun/SuperPlayer.git', :tag => 'v1.0.4' } | ||
|
||
spec.ios.deployment_target = '8.0' | ||
spec.requires_arc = true | ||
|
6 changes: 6 additions & 0 deletions
6
SuperPlayer/Category/UINavigationController+SuperPlayerRotation.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface UINavigationController (SuperPlayerRotation)<UIGestureRecognizerDelegate> | ||
|
||
@end |
34 changes: 34 additions & 0 deletions
34
SuperPlayer/Category/UINavigationController+SuperPlayerRotation.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#import "UINavigationController+SuperPlayerRotation.h" | ||
#import <objc/runtime.h> | ||
|
||
@implementation UINavigationController (SuperPlayerRotation) | ||
|
||
/** | ||
* 如果window的根视图是UINavigationController,则会先调用这个Category,然后调用UIViewController+ZFPlayerRotation | ||
* 只需要在支持除竖屏以外方向的页面重新下边三个方法 | ||
*/ | ||
|
||
// 是否支持自动转屏 | ||
- (BOOL)shouldAutorotate { | ||
return [self.topViewController shouldAutorotate]; | ||
} | ||
|
||
// 支持哪些屏幕方向 | ||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations { | ||
return [self.topViewController supportedInterfaceOrientations]; | ||
} | ||
|
||
// 默认的屏幕方向(当前ViewController必须是通过模态出来的UIViewController(模态带导航的无效)方式展现出来的,才会调用这个方法) | ||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { | ||
return [self.topViewController preferredInterfaceOrientationForPresentation]; | ||
} | ||
|
||
- (UIViewController *)childViewControllerForStatusBarStyle { | ||
return self.topViewController; | ||
} | ||
|
||
- (UIViewController *)childViewControllerForStatusBarHidden { | ||
return self.topViewController; | ||
} | ||
|
||
@end |
28 changes: 0 additions & 28 deletions
28
SuperPlayer/Category/UINavigationController+ZFPlayerRotation.h
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
SuperPlayer/Category/UINavigationController+ZFPlayerRotation.m
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
@interface UIViewController (SuperPlayerRotation) | ||
|
||
@end |
32 changes: 32 additions & 0 deletions
32
SuperPlayer/Category/UIViewController+SuperPlayerRotation.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#import "UIViewController+SuperPlayerRotation.h" | ||
|
||
@implementation UIViewController (SuperPlayerRotation) | ||
|
||
/** | ||
* 默认所有都不支持转屏,如需个别页面支持除竖屏外的其他方向,请在viewController重新下边这三个方法 | ||
*/ | ||
|
||
// 是否支持自动转屏 | ||
- (BOOL)shouldAutorotate { | ||
return NO; | ||
} | ||
|
||
// 支持哪些屏幕方向 | ||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations { | ||
return UIInterfaceOrientationMaskPortrait; | ||
} | ||
|
||
// 默认的屏幕方向(当前ViewController必须是通过模态出来的UIViewController(模态带导航的无效)方式展现出来的,才会调用这个方法) | ||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { | ||
return UIInterfaceOrientationPortrait; | ||
} | ||
|
||
- (UIStatusBarStyle)preferredStatusBarStyle { | ||
return UIStatusBarStyleDefault; // your own style | ||
} | ||
|
||
- (BOOL)prefersStatusBarHidden { | ||
return NO; // your own visibility code | ||
} | ||
|
||
@end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.