修改浏览模式在横屏、竖屏中的ui位置

This commit is contained in:
bluesea 2024-04-29 17:48:24 +08:00
parent c2e73588b5
commit 5aa1a39a31
5 changed files with 209 additions and 17 deletions

View File

@ -46,8 +46,8 @@
filePath = "SwiftProject/Project/View/CCSpatialDisplayTypeView/CCSpatialDisplayTypeView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "140"
endingLineNumber = "140"
startingLineNumber = "141"
endingLineNumber = "141"
landmarkName = "init(menuWidth:arrow:datas:configures:dissMissCallback:)"
landmarkType = "7">
<Locations>
@ -467,8 +467,8 @@
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "375"
endingLineNumber = "375"
startingLineNumber = "385"
endingLineNumber = "385"
landmarkName = "notification_didActiveNotification(notification:)"
landmarkType = "7">
</BreakpointContent>
@ -642,10 +642,42 @@
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "619"
endingLineNumber = "619"
startingLineNumber = "629"
endingLineNumber = "629"
landmarkName = "navgationButtonClick2(sender:)"
landmarkType = "7">
<Locations>
<Location
uuid = "A1C134FD-F27C-4C32-9835-E1C81C6ADB12 - 43f01c3bc010c770"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "closure #2 (Swift.Int) -&gt; () in SwiftProject.CCSpatialVideoDisplayController.navgationButtonClick2(sender: __C.UIButton) -&gt; ()"
moduleName = "SwiftProject"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/aaa/Documents/IOS%20Dev/VR/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "619"
endingLineNumber = "619"
offsetFromSymbolStart = "920">
</Location>
<Location
uuid = "A1C134FD-F27C-4C32-9835-E1C81C6ADB12 - 43f01c3bc010f857"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "closure #2 (Swift.Int) -&gt; () in SwiftProject.CCSpatialVideoDisplayController.navgationButtonClick2(sender: __C.UIButton) -&gt; ()"
moduleName = "SwiftProject"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/aaa/Documents/IOS%20Dev/VR/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "626"
endingLineNumber = "626"
offsetFromSymbolStart = "920">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
@ -658,10 +690,42 @@
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "657"
endingLineNumber = "657"
startingLineNumber = "667"
endingLineNumber = "667"
landmarkName = "selectedSpatialType(selectedIndex:)"
landmarkType = "7">
<Locations>
<Location
uuid = "C570719E-63A4-43FF-B822-56E182D55F24 - 6adcab4b430494fe"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "SwiftProject.CCSpatialVideoDisplayController.selectedSpatialType(selectedIndex: Swift.Int) -&gt; ()"
moduleName = "SwiftProject"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/aaa/Documents/IOS%20Dev/VR/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "657"
endingLineNumber = "657"
offsetFromSymbolStart = "52">
</Location>
<Location
uuid = "C570719E-63A4-43FF-B822-56E182D55F24 - 6adcab4b43049595"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "SwiftProject.CCSpatialVideoDisplayController.selectedSpatialType(selectedIndex: Swift.Int) -&gt; ()"
moduleName = "SwiftProject"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/aaa/Documents/IOS%20Dev/VR/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "664"
endingLineNumber = "664"
offsetFromSymbolStart = "52">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
@ -674,10 +738,42 @@
filePath = "SwiftProject/Project/View/CCSpatialDisplayTypeView/CCSpatialDisplayTypeView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "171"
endingLineNumber = "171"
startingLineNumber = "172"
endingLineNumber = "172"
landmarkName = "init(menuWidth:arrow:datas:configures:dissMissCallback:)"
landmarkType = "7">
<Locations>
<Location
uuid = "2332D3C8-7CB7-4C2D-9D3C-D9A7D05737DE - 14547669f585f4c4"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "SwiftProject.CCSpatialDisplayTypeView.init(menuWidth: CoreGraphics.CGFloat, arrow: __C.CGPoint, datas: Swift.Array&lt;(icon: Swift.String, title: Swift.String, isHiden: Swift.Bool)&gt;, configures: Swift.Array&lt;SwiftProject.CCSpatialDisplayTypeConfigure&gt;, dissMissCallback: () -&gt; ()) -&gt; SwiftProject.CCSpatialDisplayTypeView"
moduleName = "SwiftProject"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/aaa/Documents/IOS%20Dev/VR/SwiftProject/SwiftProject/Project/View/CCSpatialDisplayTypeView/CCSpatialDisplayTypeView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "162"
endingLineNumber = "162"
offsetFromSymbolStart = "4340">
</Location>
<Location
uuid = "2332D3C8-7CB7-4C2D-9D3C-D9A7D05737DE - 14547669f585fb1d"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "SwiftProject.CCSpatialDisplayTypeView.init(menuWidth: CoreGraphics.CGFloat, arrow: __C.CGPoint, datas: Swift.Array&lt;(icon: Swift.String, title: Swift.String, isHiden: Swift.Bool)&gt;, configures: Swift.Array&lt;SwiftProject.CCSpatialDisplayTypeConfigure&gt;, dissMissCallback: () -&gt; ()) -&gt; SwiftProject.CCSpatialDisplayTypeView"
moduleName = "SwiftProject"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/aaa/Documents/IOS%20Dev/VR/SwiftProject/SwiftProject/Project/View/CCSpatialDisplayTypeView/CCSpatialDisplayTypeView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "171"
endingLineNumber = "171"
offsetFromSymbolStart = "4340">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
@ -690,10 +786,90 @@
filePath = "SwiftProject/Project/View/CCSpatialDisplayTypeView/CCSpatialDisplayTypeView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "169"
endingLineNumber = "169"
startingLineNumber = "170"
endingLineNumber = "170"
landmarkName = "init(menuWidth:arrow:datas:configures:dissMissCallback:)"
landmarkType = "7">
<Locations>
<Location
uuid = "02F226A8-01C1-4FB7-8724-3FB114CBBC79 - 14547669f585f4e7"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "SwiftProject.CCSpatialDisplayTypeView.init(menuWidth: CoreGraphics.CGFloat, arrow: __C.CGPoint, datas: Swift.Array&lt;(icon: Swift.String, title: Swift.String, isHiden: Swift.Bool)&gt;, configures: Swift.Array&lt;SwiftProject.CCSpatialDisplayTypeConfigure&gt;, dissMissCallback: () -&gt; ()) -&gt; SwiftProject.CCSpatialDisplayTypeView"
moduleName = "SwiftProject"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/aaa/Documents/IOS%20Dev/VR/SwiftProject/SwiftProject/Project/View/CCSpatialDisplayTypeView/CCSpatialDisplayTypeView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "161"
endingLineNumber = "161"
offsetFromSymbolStart = "4008">
</Location>
<Location
uuid = "02F226A8-01C1-4FB7-8724-3FB114CBBC79 - 14547669f585fb3c"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "SwiftProject.CCSpatialDisplayTypeView.init(menuWidth: CoreGraphics.CGFloat, arrow: __C.CGPoint, datas: Swift.Array&lt;(icon: Swift.String, title: Swift.String, isHiden: Swift.Bool)&gt;, configures: Swift.Array&lt;SwiftProject.CCSpatialDisplayTypeConfigure&gt;, dissMissCallback: () -&gt; ()) -&gt; SwiftProject.CCSpatialDisplayTypeView"
moduleName = "SwiftProject"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/aaa/Documents/IOS%20Dev/VR/SwiftProject/SwiftProject/Project/View/CCSpatialDisplayTypeView/CCSpatialDisplayTypeView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "170"
endingLineNumber = "170"
offsetFromSymbolStart = "4008">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "D98F3857-4C19-43E5-BF3F-36E1A8B7C5C1"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialVideoDisplayController/CCSpatialVideoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "606"
endingLineNumber = "606"
landmarkName = "navgationButtonClick2(sender:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "3EC02902-D13D-4894-8E99-D225CFD60753"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialPhotoDisplayController/CCSpatialPhotoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "225"
endingLineNumber = "225"
landmarkName = "screenOrientationRotate()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "A656010D-92B9-41AF-AFCD-DFA1C59CBBE3"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SwiftProject/Project/Controller/RecordingVideo/CCSpatialPhotoDisplayController/CCSpatialPhotoDisplayController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "233"
endingLineNumber = "233"
landmarkName = "screenOrientationRotate()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>

View File

@ -223,13 +223,16 @@ class CCSpatialPhotoDisplayController: BaseController {
mTopImgView.isHidden = false
edBtn?.isHidden = false
menuView.isLandspaceScreen = false
menuView.dismiss()
let pointOnScreen = navtionImgView!.convert(CGPointMake(KScreenWidth*0.5, navtionImgView!.bottom), to: KWindow)
menuView.exUpdateArrowPointWithIsLandspace(pointOnScreen)
break
case .landscapeLeft , .landscapeRight:
isLandscape = true
menuView.isLandspaceScreen = true
menuView.dismiss()
let pointOnScreen = navtionImgView!.convert(CGPointMake(KScreenHeight*0.5, navtionImgView!.bottom), to: KWindow)
menuView.exUpdateArrowPointWithIsLandspace(pointOnScreen)
print("Landscape ...")
navtionBar?.snp.updateConstraints { make in
make.top.equalToSuperview().offset(-30)
@ -251,8 +254,7 @@ class CCSpatialPhotoDisplayController: BaseController {
print("Other")
}
let pointOnScreen = navtionImgView!.convert(CGPointMake(KScreenHeight*0.5, navtionImgView!.bottom), to: KWindow)
menuView.exUpdateArrowPointWithIsLandspace(pointOnScreen)
}

View File

@ -285,10 +285,18 @@ class CCSpatialVideoDisplayController: BaseController {
self.navtionBar?.isHidden = false
self.customPlayer.isLandscape = false
mTopImgView.isHidden = false
menuView.isLandspaceScreen = false
menuView.dismiss()
let pointOnScreen = navtionImgView!.convert(CGPointMake(KScreenWidth*0.5, navtionImgView!.bottom), to: KWindow)
menuView.exUpdateArrowPointWithIsLandspace(pointOnScreen)
break
case .landscapeLeft , .landscapeRight:
print("Landscape ...")
self.customPlayer.isLandscape = true
menuView.isLandspaceScreen = true
menuView.dismiss()
let pointOnScreen = navtionImgView!.convert(CGPointMake(KScreenHeight*0.5, navtionImgView!.bottom), to: KWindow)
menuView.exUpdateArrowPointWithIsLandspace(pointOnScreen)
self.customPlayer.snp.updateConstraints { make in
make.height.equalTo(KScreenWidth)
}
@ -304,6 +312,8 @@ class CCSpatialVideoDisplayController: BaseController {
default:
print("Other")
}
}
func configureUI(){

View File

@ -73,7 +73,8 @@ public class CCSpatialDisplayTypeView: UIView {
private var myFrame:CGRect! //tableview frame
private var arrowView : UIView! = nil
var isLandspaceScreen = false {
didSet{
willSet{
print("isLandspaceScreen willset:\(isLandspaceScreen)")
if isLandspaceScreen {
self.frame = CGRect(origin: .zero, size: CGSize(width: KScrH, height: KScrW))
}
@ -205,12 +206,15 @@ public class CCSpatialDisplayTypeView: UIView {
//MARK: - UI
func initViews() {
self.subviews.forEach { v in
v.removeFromSuperview()
}
self.backgroundColor = UIColor.black.withAlphaComponent(popMenuOutAlpha)
let arrowPs = getArrowPoints()
myFrame.origin = arrowPs.3
let isarrowUP = arrowPs.4
print(arrowPs)
// print(arrowPs)
//
arrowView=UIView(frame: CGRect(x: myFrame.origin.x, y: isarrowUP ? myFrame.origin.y-arrowViewHeight : myFrame.origin.y+myFrame.height, width: myFrame.width, height: arrowViewHeight))
let layer=CAShapeLayer()