修复视图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 = {
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.textColor = KTextColor_White
label.text = "你只需捕捉美好,转码交给我们"
@ -266,8 +267,9 @@ class CCSpatialShootController: BaseController {
NotificationCenter.default.addObserver(self, selector: #selector(orientationDidChange), name: UIDevice.orientationDidChangeNotification, object: nil)
configureSession() //
showTips()
setUI()
showTips()
self.view.bringSubviewToFront(navtionImgView!)
//
@ -467,7 +469,7 @@ class CCSpatialShootController: BaseController {
func showTips() {
self.view.addSubview(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
} completion: { finished in
self.tipsLabel.isHidden = true
@ -475,7 +477,6 @@ class CCSpatialShootController: BaseController {
}
func showHorizontalScreenTips() {
self.horizontalImageView.isHidden = false
self.horizontalLabel.isHidden = false
@ -493,7 +494,6 @@ class CCSpatialShootController: BaseController {
}
func hidenHorizontalScreenTips() {
UIView.animate(withDuration: 0.5) {
self.horizontalImageView.alpha = 0.0
self.horizontalLabel.alpha = 0.0