修复视图bug:空间拍摄页面,将tiplabel显示在最外出,同时增加显示时长:3s,确保竖屏时能够看得清楚

This commit is contained in:
bluesea 2024-03-06 10:22:48 +08:00
parent 285f85799d
commit 6ce1d1eb36

View File

@ -53,7 +53,8 @@ class CCSpatialShootController: BaseController {
lazy var tipsLabel: UILabel = { lazy var tipsLabel: UILabel = {
let label = UILabel.init(frame: CGRectMake((KScreenWidth - 320)/2, KNavigationBarHeight+KStatusBarHeight + 20, 320, 36)) let label = UILabel.init(frame: CGRectMake((KScreenWidth - 320)/2, KNavigationBarHeight+KStatusBarHeight + 20, 320, 36))
label.backgroundColor = UIColor(hexString: "ffffff", alpha: 0.2) // label.backgroundColor = UIColor(hexString: "ffffff", alpha: 0.2)
label.backgroundColor = UIColor.darkGray
label.font = KFont_Medium(12) label.font = KFont_Medium(12)
label.textColor = KTextColor_White label.textColor = KTextColor_White
label.text = "你只需捕捉美好,转码交给我们" label.text = "你只需捕捉美好,转码交给我们"
@ -266,8 +267,9 @@ class CCSpatialShootController: BaseController {
NotificationCenter.default.addObserver(self, selector: #selector(orientationDidChange), name: UIDevice.orientationDidChangeNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(orientationDidChange), name: UIDevice.orientationDidChangeNotification, object: nil)
configureSession() // configureSession() //
showTips()
setUI() setUI()
showTips()
self.view.bringSubviewToFront(navtionImgView!) self.view.bringSubviewToFront(navtionImgView!)
// //
@ -467,7 +469,7 @@ class CCSpatialShootController: BaseController {
func showTips() { func showTips() {
self.view.addSubview(tipsLabel) self.view.addSubview(tipsLabel)
self.view.bringSubviewToFront(tipsLabel) self.view.bringSubviewToFront(tipsLabel)
UIView.animate(withDuration: 0.2, delay: 2.0,options: .curveEaseInOut) { UIView.animate(withDuration: 3, delay: 2.0,options: .curveEaseInOut) {
self.tipsLabel.alpha = 0 self.tipsLabel.alpha = 0
} completion: { finished in } completion: { finished in
self.tipsLabel.isHidden = true self.tipsLabel.isHidden = true
@ -475,7 +477,6 @@ class CCSpatialShootController: BaseController {
} }
func showHorizontalScreenTips() { func showHorizontalScreenTips() {
self.horizontalImageView.isHidden = false self.horizontalImageView.isHidden = false
self.horizontalLabel.isHidden = false self.horizontalLabel.isHidden = false
@ -493,7 +494,6 @@ class CCSpatialShootController: BaseController {
} }
func hidenHorizontalScreenTips() { func hidenHorizontalScreenTips() {
UIView.animate(withDuration: 0.5) { UIView.animate(withDuration: 0.5) {
self.horizontalImageView.alpha = 0.0 self.horizontalImageView.alpha = 0.0
self.horizontalLabel.alpha = 0.0 self.horizontalLabel.alpha = 0.0