Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
426cd1d4
Commit
426cd1d4
authored
Jan 08, 2025
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加禁止屏幕旋转
parent
4546457d
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
93 additions
and
39 deletions
+93
-39
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+11
-7
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+5
-14
YHBaseViewController.swift
galaxy/galaxy/Classes/Base/C/YHBaseViewController.swift
+9
-0
YHNavigationController.swift
galaxy/galaxy/Classes/Base/C/YHNavigationController.swift
+8
-0
YHTabBarViewController.swift
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
+8
-0
YHBasePlayerViewController.swift
.../LivestreamSales(直播销售)/C/YHBasePlayerViewController.swift
+2
-6
YHLiveAppointmentViewController.swift
...streamSales(直播销售)/C/YHLiveAppointmentViewController.swift
+10
-0
YHLivePlayerViewController.swift
.../LivestreamSales(直播销售)/C/YHLivePlayerViewController.swift
+6
-2
YHLiveStateViewController.swift
...s/LivestreamSales(直播销售)/C/YHLiveStateViewController.swift
+10
-0
YHMessageInputViewController.swift
...ivestreamSales(直播销售)/C/YHMessageInputViewController.swift
+10
-0
YHVODPlayerViewController.swift
...s/LivestreamSales(直播销售)/C/YHVODPlayerViewController.swift
+10
-0
Info.plist
galaxy/galaxy/Res/Info.plist
+4
-10
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
426cd1d4
...
...
@@ -8036,7 +8036,7 @@
);
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
galaxy/Res/Info.plist
;
INFOPLIST_KEY_CFBundleDisplayName
=
"银河港生活-
Test
"
;
INFOPLIST_KEY_CFBundleDisplayName
=
"银河港生活-
Dev
"
;
INFOPLIST_KEY_LSApplicationCategoryType
=
"public.app-category.business"
;
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace
=
YES
;
INFOPLIST_KEY_NSCameraUsageDescription
=
"APP需要您的同意,才能使用相机进行照片拍摄来完成信息填写,如禁止将无法拍摄照片,会影响资料提交效率。"
;
...
...
@@ -8045,7 +8045,8 @@
INFOPLIST_KEY_NSPhotoLibraryUsageDescription
=
"APP需要您的同意,才能访问相册进行选择照片上传来完成信息填写,如禁止将无法上传选定图片,会影响资料提交效率。"
;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents
=
YES
;
INFOPLIST_KEY_UILaunchStoryboardName
=
"Launch Screen.storyboard"
;
INFOPLIST_KEY_UISupportedInterfaceOrientations
=
UIInterfaceOrientationPortrait
;
INFOPLIST_KEY_UISupportedInterfaceOrientations
=
"UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"
;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad
=
"UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"
;
INFOPLIST_KEY_UIUserInterfaceStyle
=
Light
;
IPHONEOS_DEPLOYMENT_TARGET
=
13.0
;
LD_RUNPATH_SEARCH_PATHS
=
(
...
...
@@ -8181,7 +8182,7 @@
);
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
galaxy/Res/Info.plist
;
INFOPLIST_KEY_CFBundleDisplayName
=
"银河港生活-
Uat
"
;
INFOPLIST_KEY_CFBundleDisplayName
=
"银河港生活-
Dev
"
;
INFOPLIST_KEY_LSApplicationCategoryType
=
"public.app-category.business"
;
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace
=
YES
;
INFOPLIST_KEY_NSCameraUsageDescription
=
"APP需要您的同意,才能使用相机进行照片拍摄来完成信息填写,如禁止将无法拍摄照片,会影响资料提交效率。"
;
...
...
@@ -8190,7 +8191,8 @@
INFOPLIST_KEY_NSPhotoLibraryUsageDescription
=
"APP需要您的同意,才能访问相册进行选择照片上传来完成信息填写,如禁止将无法上传选定图片,会影响资料提交效率。"
;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents
=
YES
;
INFOPLIST_KEY_UILaunchStoryboardName
=
"Launch Screen.storyboard"
;
INFOPLIST_KEY_UISupportedInterfaceOrientations
=
UIInterfaceOrientationPortrait
;
INFOPLIST_KEY_UISupportedInterfaceOrientations
=
"UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"
;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad
=
"UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"
;
INFOPLIST_KEY_UIUserInterfaceStyle
=
Light
;
IPHONEOS_DEPLOYMENT_TARGET
=
13.0
;
LD_RUNPATH_SEARCH_PATHS
=
(
...
...
@@ -8397,7 +8399,8 @@
INFOPLIST_KEY_NSPhotoLibraryUsageDescription
=
"APP需要您的同意,才能访问相册进行选择照片上传来完成信息填写,如禁止将无法上传选定图片,会影响资料提交效率。"
;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents
=
YES
;
INFOPLIST_KEY_UILaunchStoryboardName
=
"Launch Screen.storyboard"
;
INFOPLIST_KEY_UISupportedInterfaceOrientations
=
UIInterfaceOrientationPortrait
;
INFOPLIST_KEY_UISupportedInterfaceOrientations
=
"UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"
;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad
=
"UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"
;
INFOPLIST_KEY_UIUserInterfaceStyle
=
Light
;
IPHONEOS_DEPLOYMENT_TARGET
=
13.0
;
LD_RUNPATH_SEARCH_PATHS
=
(
...
...
@@ -8435,7 +8438,7 @@
);
GENERATE_INFOPLIST_FILE
=
YES
;
INFOPLIST_FILE
=
galaxy/Res/Info.plist
;
INFOPLIST_KEY_CFBundleDisplayName
=
"银河港生活"
;
INFOPLIST_KEY_CFBundleDisplayName
=
"银河港生活
-Dev
"
;
INFOPLIST_KEY_LSApplicationCategoryType
=
"public.app-category.business"
;
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace
=
YES
;
INFOPLIST_KEY_NSCameraUsageDescription
=
"APP需要您的同意,才能使用相机进行照片拍摄来完成信息填写,如禁止将无法拍摄照片,会影响资料提交效率。"
;
...
...
@@ -8444,7 +8447,8 @@
INFOPLIST_KEY_NSPhotoLibraryUsageDescription
=
"APP需要您的同意,才能访问相册进行选择照片上传来完成信息填写,如禁止将无法上传选定图片,会影响资料提交效率。"
;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents
=
YES
;
INFOPLIST_KEY_UILaunchStoryboardName
=
"Launch Screen.storyboard"
;
INFOPLIST_KEY_UISupportedInterfaceOrientations
=
UIInterfaceOrientationPortrait
;
INFOPLIST_KEY_UISupportedInterfaceOrientations
=
"UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"
;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad
=
"UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"
;
INFOPLIST_KEY_UIUserInterfaceStyle
=
Light
;
IPHONEOS_DEPLOYMENT_TARGET
=
13.0
;
LD_RUNPATH_SEARCH_PATHS
=
(
...
...
galaxy/galaxy/AppDelegate.swift
View file @
426cd1d4
...
...
@@ -21,19 +21,6 @@ import HyphenateChat
@main
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
,
WXApiDelegate
{
var
blockRotation
:
UIInterfaceOrientationMask
=
.
portrait
{
didSet
{
if
blockRotation
.
contains
(
.
portrait
){
//强制设置成竖屏
UIDevice
.
current
.
setValue
(
UIInterfaceOrientation
.
portrait
.
rawValue
,
forKey
:
"orientation"
)
}
else
{
//强制设置成横屏
UIDevice
.
current
.
setValue
(
UIInterfaceOrientation
.
landscapeLeft
.
rawValue
,
forKey
:
"orientation"
)
}
}
}
var
window
:
UIWindow
?
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
...
...
@@ -154,7 +141,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
}
func
application
(
_
application
:
UIApplication
,
supportedInterfaceOrientationsFor
window
:
UIWindow
?)
->
UIInterfaceOrientationMask
{
return
.
all
let
vc
=
UIViewController
.
current
??
UIViewController
()
if
vc
.
isKind
(
of
:
YHLivePlayerViewController
.
self
)
{
return
[
.
portrait
,
.
landscapeRight
]
}
return
.
portrait
}
func
application
(
_
app
:
UIApplication
,
open
url
:
URL
,
options
:
[
UIApplication
.
OpenURLOptionsKey
:
Any
]
=
[:])
->
Bool
{
...
...
galaxy/galaxy/Classes/Base/C/YHBaseViewController.swift
View file @
426cd1d4
...
...
@@ -35,6 +35,14 @@ class YHBaseViewController: UIViewController {
}
}
override
var
shouldAutorotate
:
Bool
{
return
false
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
[
.
portrait
,
.
landscapeLeft
,
.
landscapeRight
]
}
override
var
prefersStatusBarHidden
:
Bool
{
return
self
.
gk_statusBarHidden
}
...
...
@@ -123,3 +131,4 @@ class YHBaseViewController: UIViewController {
// return true
// }
//}
galaxy/galaxy/Classes/Base/C/YHNavigationController.swift
View file @
426cd1d4
...
...
@@ -20,6 +20,14 @@ class YHNavigationController: UINavigationController {
}
super
.
pushViewController
(
viewController
,
animated
:
animated
)
}
override
var
shouldAutorotate
:
Bool
{
return
false
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
[
.
portrait
,
.
landscapeLeft
,
.
landscapeRight
]
}
}
//extension YHNavigationController: UIGestureRecognizerDelegate {
...
...
galaxy/galaxy/Classes/Base/C/YHTabBarViewController.swift
View file @
426cd1d4
...
...
@@ -26,6 +26,14 @@ class YHTabBarViewController: ESTabBarController {
private
var
shareModel
:
TabBarShareModel
?
override
var
shouldAutorotate
:
Bool
{
return
false
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
[
.
portrait
,
.
landscapeLeft
,
.
landscapeRight
]
}
override
func
viewDidLayoutSubviews
()
{
super
.
viewDidLayoutSubviews
()
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHBasePlayerViewController.swift
View file @
426cd1d4
...
...
@@ -93,14 +93,10 @@ class YHBasePlayerViewController: YHBaseViewController {
// MARK: - Orientation Support
extension
YHBasePlayerViewController
{
override
var
shouldAutorotate
:
Bool
{
return
tru
e
return
fals
e
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
.
allButUpsideDown
}
override
var
preferredInterfaceOrientationForPresentation
:
UIInterfaceOrientation
{
return
.
portrait
return
[
.
portrait
,
.
landscapeLeft
,
.
landscapeRight
]
}
}
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHLiveAppointmentViewController.swift
View file @
426cd1d4
...
...
@@ -11,7 +11,17 @@ import UIKit
class
YHLiveAppointmentViewController
:
YHBaseViewController
{
private
let
viewModel
=
YHLiveSalesViewModel
()
private
var
liveInfo
:
YHShareLiveInfoModel
?
override
var
shouldAutorotate
:
Bool
{
return
false
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
.
allButUpsideDown
}
override
var
preferredInterfaceOrientationForPresentation
:
UIInterfaceOrientation
{
return
.
portrait
}
private
lazy
var
topImageView
:
UIImageView
=
{
let
view
=
UIImageView
()
view
.
contentMode
=
.
scaleAspectFit
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHLivePlayerViewController.swift
View file @
426cd1d4
...
...
@@ -35,9 +35,12 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
private
var
originalX
:
CGFloat
=
0
private
var
isMessageListHidden
=
false
//默认展示
// MARK: - UI Components
override
var
shouldAutorotate
:
Bool
{
return
false
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
.
all
// 返回支持的方向
return
[
.
portrait
,
.
landscapeLeft
,
.
landscapeRight
]
}
private
lazy
var
bottomInputBar
:
YHInputBottomBar
=
{
...
...
@@ -358,6 +361,7 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
if
!
isLiveStateOn
{
setupStateViewController
()
}
changePortrait
()
liveStateVC
.
setupData
(
liveDetail
:
liveDetail
)
}
else
{
removeStateViewController
()
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHLiveStateViewController.swift
View file @
426cd1d4
...
...
@@ -29,7 +29,17 @@ class YHLiveStateViewController: YHBaseViewController {
var
messageLabel
:
UILabel
!
var
getCodeButton
:
UIButton
!
var
state
:
YHLiveState
=
.
start
override
var
shouldAutorotate
:
Bool
{
return
false
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
.
allButUpsideDown
}
override
var
preferredInterfaceOrientationForPresentation
:
UIInterfaceOrientation
{
return
.
portrait
}
private
lazy
var
bottomView
:
UIView
=
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
260
))
view
.
isHidden
=
true
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHMessageInputViewController.swift
View file @
426cd1d4
...
...
@@ -23,7 +23,17 @@ class YHMessageInputViewController: UIViewController {
var
inputCallback
:
((
YHMessageInputViewController
,
String
)
->
Void
)?
var
closeCallback
:
(()
->
Void
)?
override
var
shouldAutorotate
:
Bool
{
return
false
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
.
allButUpsideDown
}
override
var
preferredInterfaceOrientationForPresentation
:
UIInterfaceOrientation
{
return
.
portrait
}
private
lazy
var
inputMainView
:
UIView
=
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
54
))
view
.
backgroundColor
=
.
white
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHVODPlayerViewController.swift
View file @
426cd1d4
...
...
@@ -16,7 +16,17 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
var
startPosition
:
Int
=
0
private
let
viewModel
=
YHLiveSalesViewModel
()
private
var
goodsListView
:
YHLiveShopView
?
override
var
shouldAutorotate
:
Bool
{
return
false
}
override
var
supportedInterfaceOrientations
:
UIInterfaceOrientationMask
{
return
.
allButUpsideDown
}
override
var
preferredInterfaceOrientationForPresentation
:
UIInterfaceOrientation
{
return
.
portrait
}
private
lazy
var
progressControl
:
YHVideoProgressControl
=
{
let
view
=
YHVideoProgressControl
()
return
view
...
...
galaxy/galaxy/Res/Info.plist
View file @
426cd1d4
...
...
@@ -2,16 +2,6 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
UIViewControllerBasedStatusBarAppearance
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
agc_applinking_not_read_pasteboard
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
CFBundleDocumentTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
...
...
@@ -135,5 +125,9 @@
<
/
a
rr
a
y
>
<
k
e
y
>
UIFileSharingEnabled
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UIViewControllerBasedStatusBarAppearance
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
agc_applinking_not_read_pasteboard
<
/k
e
y
>
<
fa
ls
e
/
>
<
/
d
i
c
t
>
<
/plist
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment