|
@@ -418,6 +418,23 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
bottomOprationBgView.isHidden = true
|
|
|
return bottomOprationBgView
|
|
|
}()
|
|
|
+
|
|
|
+ ///保存视频到相册提示
|
|
|
+ lazy var saveVideoTipsBgView: UIView = {
|
|
|
+ let saveVideoTipsBgView = UIView(frame: CGRect(x: 0, y: cDevice_iPhoneNavBarAndStatusBarHei, width: cScreenWidth, height: 40))
|
|
|
+ saveVideoTipsBgView.backgroundColor = UIColor.init(red: 0, green: 0, blue: 0, alpha: 0.4)
|
|
|
+ saveVideoTipsBgView.isHidden = true
|
|
|
+ saveVideoTipsBgView.alpha = 1
|
|
|
+ return saveVideoTipsBgView
|
|
|
+ }()
|
|
|
+ lazy var saveVideoTipsLabel: UILabel = {
|
|
|
+ let saveVideoTipsLabel = UILabel(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: 40))
|
|
|
+ saveVideoTipsLabel.textColor = .white
|
|
|
+ saveVideoTipsLabel.textAlignment = .center
|
|
|
+ saveVideoTipsLabel.font = UIFont.boldSystemFont(ofSize: 17)
|
|
|
+ saveVideoTipsLabel.text = "视频保存中..."
|
|
|
+ return saveVideoTipsLabel
|
|
|
+ }()
|
|
|
|
|
|
override func backBtnClick() {
|
|
|
if isExportSuccess {
|
|
@@ -489,7 +506,12 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
|
|
|
view.addSubview(publicTitleView)
|
|
|
view.addSubview(publicEditCoverView)
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ view.addSubview(saveVideoTipsBgView)
|
|
|
+ saveVideoTipsBgView.addSubview(saveVideoTipsLabel)
|
|
|
+
|
|
|
+
|
|
|
coverImageTitle.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(settingCoverImage)))
|
|
|
coverImageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(settingCoverImage)))
|
|
|
|
|
@@ -896,6 +918,10 @@ extension PQStuckPointPublicController {
|
|
|
|
|
|
if(saveMovieLocalURL == nil){
|
|
|
BFLog(message: "保存相册的视频导出地址无效!!!")
|
|
|
+ saveVideoTipsLabel.text = "视频已经保存失败"
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.8) { [weak self] in
|
|
|
+ self?.saveVideoTipsBgView.isHidden = true
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
let authStatus = PHPhotoLibrary.authorizationStatus()
|
|
@@ -907,9 +933,18 @@ extension PQStuckPointPublicController {
|
|
|
DispatchQueue.main.async { [weak self] in
|
|
|
if self?.view != nil {
|
|
|
if isFinished {
|
|
|
-// cShowHUB(superView: self!.view, msg: "视频已保存至相册")
|
|
|
+ self?.saveVideoTipsLabel.text = "视频已经保存到相册"
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.8) { [weak self] in
|
|
|
+ self?.saveVideoTipsBgView.isHidden = true
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
-// cShowHUB(superView: self!.view, msg: "视频保存失败")
|
|
|
+ self?.saveVideoTipsLabel.text = "视频已经保存失败"
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.8) { [weak self] in
|
|
|
+ self?.saveVideoTipsBgView.isHidden = true
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1232,7 +1267,10 @@ extension PQStuckPointPublicController {
|
|
|
cShowHUB(superView: nil, msg: "视频发布失败,请重新合成")
|
|
|
} else {
|
|
|
bottomOprationBgView.isHidden = false
|
|
|
-
|
|
|
+ //add by ak 发布成功后如果带片尾的视频还没有生成成功时,出提示
|
|
|
+ if(saveMovieLocalURL == nil){
|
|
|
+ saveVideoTipsBgView.isHidden = false
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1669,9 +1707,7 @@ extension PQStuckPointPublicController {
|
|
|
|
|
|
ImageDownloader.default.downloadImage(with: URL(string: BFLoginUserInfo.shared.avatarUrl)!, options: nil) { result in
|
|
|
switch result {
|
|
|
- case let .success(imageResult): break
|
|
|
-
|
|
|
-
|
|
|
+ case let .success(imageResult):
|
|
|
let image = UIImage.nx_circleImage(imageResult.image)
|
|
|
if(image == nil){
|
|
|
BFLog(message: "image date is error!!")
|