|
@@ -54,11 +54,19 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
var tempHeight: CGFloat = 0
|
|
|
var tempWidth: CGFloat = 0
|
|
|
if width > height {
|
|
|
- tempHeight = (maxWidth * height / width)
|
|
|
tempWidth = maxWidth
|
|
|
+ tempHeight = (maxWidth * height / width)
|
|
|
+ if tempHeight > maxHeight {
|
|
|
+ tempHeight = maxHeight
|
|
|
+ tempWidth = (maxHeight * width / height)
|
|
|
+ }
|
|
|
} else {
|
|
|
tempHeight = maxHeight
|
|
|
tempWidth = (maxHeight * width / height)
|
|
|
+ if tempWidth > maxWidth {
|
|
|
+ tempWidth = maxWidth
|
|
|
+ tempHeight = (maxWidth * height / width)
|
|
|
+ }
|
|
|
}
|
|
|
if tempHeight.isNaN || tempWidth.isNaN {
|
|
|
return CGSize.zero
|
|
@@ -207,7 +215,7 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
remindLab.textAlignment = .center
|
|
|
remindLab.numberOfLines = 3
|
|
|
let arr = NSMutableAttributedString(string: "制作完成啦🎉\n\n快分享秀一下")
|
|
|
- arr.addAttributes([.font: UIFont.systemFont(ofSize: 30,weight: .semibold)], range: NSRange(location: arr.length - 6, length: 6))
|
|
|
+ arr.addAttributes([.font: UIFont.systemFont(ofSize: 30, weight: .semibold)], range: NSRange(location: arr.length - 6, length: 6))
|
|
|
remindLab.attributedText = arr
|
|
|
return remindLab
|
|
|
}()
|
|
@@ -254,12 +262,10 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
return oprationBgView
|
|
|
}()
|
|
|
|
|
|
-
|
|
|
override func backBtnClick() {
|
|
|
-
|
|
|
- if(isExportSuccess){
|
|
|
+ if isExportSuccess {
|
|
|
navigationController?.popViewController(animated: true)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
view.endEditing(true)
|
|
|
let remindData = PQBaseModel()
|
|
|
remindData.title = "编辑的内容,将不会被保存"
|
|
@@ -277,13 +283,11 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
self?.exporter.cancel()
|
|
|
}
|
|
|
self?.navigationController?.popViewController(animated: true)
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
override func viewDidLoad() {
|
|
|
super.viewDidLoad()
|
|
|
|
|
@@ -919,7 +923,7 @@ extension PQStuckPointPublicController {
|
|
|
if sender.isSelected {
|
|
|
|
|
|
PQEventTrackViewModel.baseReportUpload(businessType: .bt_buttonClick, objectType: .ot_click_finished, pageSource: .sp_stuck_publishSyncedUp, extParams: ["videoId": videoData?.uniqueId ?? ""], remindmsg: "卡点视频数据上报-(点击上报:完成)")
|
|
|
- navigationController?.popToRootViewController(animated: true)
|
|
|
+ navigationController?.viewControllers = [(navigationController?.viewControllers.first)!]
|
|
|
|
|
|
postNotification(name: cFinishedPublishedNotiKey)
|
|
|
}
|