修复视图bug:空间拍摄页面,将tiplabel显示在最外出,同时增加显示时长:3s,确保竖屏时能够看得清楚
This commit is contained in:
parent
285f85799d
commit
6ce1d1eb36
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user