|
@@ -23,11 +23,12 @@
|
|
|
|
|
|
import Foundation
|
|
import Foundation
|
|
|
|
|
|
-class NCViewerImagemeter: UIViewController, AVAudioPlayerDelegate {
|
|
|
|
|
|
+class NCViewerImagemeter: UIViewController {
|
|
|
|
|
|
@IBOutlet weak var img: UIImageView!
|
|
@IBOutlet weak var img: UIImageView!
|
|
@IBOutlet weak var imgHeightConstraint: NSLayoutConstraint!
|
|
@IBOutlet weak var imgHeightConstraint: NSLayoutConstraint!
|
|
-
|
|
|
|
|
|
+ @IBOutlet weak var progressView: UIProgressView!
|
|
|
|
+
|
|
private let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
private let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
private var nameArchiveImagemeter: String = ""
|
|
private var nameArchiveImagemeter: String = ""
|
|
|
|
|
|
@@ -108,7 +109,7 @@ class NCViewerImagemeter: UIViewController, AVAudioPlayerDelegate {
|
|
|
|
|
|
let coordinateNormalize = IMImagemeterCodable.sharedInstance.convertCoordinate(x: element.center.x, y: element.center.y, width: Double(self.view.bounds.width), height: Double(imgHeightConstraint.constant), button: 30)
|
|
let coordinateNormalize = IMImagemeterCodable.sharedInstance.convertCoordinate(x: element.center.x, y: element.center.y, width: Double(self.view.bounds.width), height: Double(imgHeightConstraint.constant), button: 30)
|
|
let x = coordinateNormalize.x
|
|
let x = coordinateNormalize.x
|
|
- let y = coordinateNormalize.y + 15
|
|
|
|
|
|
+ let y = coordinateNormalize.y + Double(img.frame.origin.y)
|
|
|
|
|
|
let button = UIButton()
|
|
let button = UIButton()
|
|
button.frame = CGRect(x: x, y: y, width: 30, height: 30)
|
|
button.frame = CGRect(x: x, y: y, width: 30, height: 30)
|
|
@@ -146,3 +147,11 @@ class NCViewerImagemeter: UIViewController, AVAudioPlayerDelegate {
|
|
self.dismiss(animated: true, completion: nil)
|
|
self.dismiss(animated: true, completion: nil)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+extension NCViewerImagemeter: AVAudioPlayerDelegate {
|
|
|
|
+
|
|
|
|
+ func audioPlayerDidFinishPlaying(_ player: AVAudioPlayer, successfully flag: Bool) {
|
|
|
|
+
|
|
|
|
+ progressView.progress = 0
|
|
|
|
+ }
|
|
|
|
+}
|