去掉顶部菜单箭头、修改顶部菜单宽度、修改顶部菜单背景颜色为clear

This commit is contained in:
bluesea 2024-04-30 17:27:41 +08:00
parent 0fe9e74cec
commit 8d7aecad87
3 changed files with 18 additions and 16 deletions

View File

@ -175,7 +175,7 @@ class CCSpatialPhotoDisplayController: BaseController {
//init (testarrow)
let pointOnScreen = navtionImgView!.convert(CGPointMake(navtionImgView!.centerX, navtionImgView!.bottom), to: KWindow)
let popMenu = CCSpatialDisplayTypeView(menuWidth: SCREEN_Width * 0.4, arrow: pointOnScreen, datas: typeData,configures: parameters){ [weak self] in
let popMenu = CCSpatialDisplayTypeView(menuWidth: mTopCenterTypeButton.width, arrow: pointOnScreen, datas: typeData,configures: parameters){ [weak self] in
//dissmiss
self?.mTopCenterTypeButton.setImage(UIImage.init(named: "type_button_arrow_down"), for: .normal)
}

View File

@ -186,7 +186,7 @@ class CCSpatialVideoDisplayController: BaseController {
//init (testarrow)
let pointOnScreen = navtionImgView!.convert(CGPointMake(navtionImgView!.centerX, navtionImgView!.bottom), to: KWindow)
let popMenu = CCSpatialDisplayTypeView(menuWidth: SCREEN_Width * 0.4, arrow: pointOnScreen, datas: typeData,configures: parameters){[weak self] in
let popMenu = CCSpatialDisplayTypeView(menuWidth: mTopCenterTypeButton.width, arrow: pointOnScreen, datas: typeData,configures: parameters){[weak self] in
//dissmiss
self?.mTopCenterTypeButton.setImage(UIImage.init(named: "type_button_arrow_down"), for: .normal)
}
@ -303,6 +303,7 @@ class CCSpatialVideoDisplayController: BaseController {
menuView.isLandspaceScreen = true
menuView.dismiss()
let pointOnScreen = navtionImgView!.convert(CGPointMake(KScreenHeight*0.5, navtionImgView!.bottom), to: KWindow)
// pointOnScreen = CGPoint(x: pointOnScreen.x, y: pointOnScreen.y - 40)
menuView.exUpdateArrowPointWithIsLandspace(pointOnScreen)
self.customPlayer.snp.updateConstraints { make in
make.height.equalTo(KScreenWidth)

View File

@ -229,23 +229,24 @@ public class CCSpatialDisplayTypeView: UIView {
self.frame = UIScreen.main.bounds
}
self.backgroundColor = UIColor.black.withAlphaComponent(popMenuOutAlpha)
self.backgroundColor = .clear//UIColor.black.withAlphaComponent(popMenuOutAlpha)
let arrowPs = getArrowPoints()
myFrame.origin = arrowPs.3
let isarrowUP = arrowPs.4
// 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()
let path=UIBezierPath()
path.move(to: arrowPs.0)
path.addLine(to: arrowPs.1)
path.addLine(to: arrowPs.2)
layer.path=path.cgPath
layer.fillColor = popMenuBgColor.cgColor
arrowView.layer.addSublayer(layer)
self.addSubview(arrowView)
myFrame.origin.y = myFrame.origin.y //- arrowViewHeight
// let isarrowUP = arrowPs.4
//// 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()
// let path=UIBezierPath()
// path.move(to: arrowPs.0)
// path.addLine(to: arrowPs.1)
// path.addLine(to: arrowPs.2)
// layer.path=path.cgPath
// layer.fillColor = popMenuBgColor.cgColor
// arrowView.layer.addSublayer(layer)
// self.addSubview(arrowView)
tableView=UITableView(frame: CGRect(x: myFrame.origin.x,y: myFrame.origin.y,width: myFrame.width,height: myFrame.height), style: .grouped)
tableView.register(CCSpatialDisplayTypeCell.classForCoder(), forCellReuseIdentifier: CCSpatialDisplayTypeView.cellID)