|
@@ -75,16 +75,6 @@ public class NCViewerImageContentView: UIScrollView {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- internal var isStatusView: Bool = false {
|
|
|
- didSet {
|
|
|
- statusView.isHidden = !isStatusView
|
|
|
- if isStatusView {
|
|
|
- //
|
|
|
- } else {
|
|
|
- //
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
internal var zoomLevels: ZoomScale? {
|
|
|
didSet {
|
|
|
zoomScale = ZoomScale.default.minimumZoomScale
|
|
@@ -98,7 +88,6 @@ public class NCViewerImageContentView: UIScrollView {
|
|
|
private enum Constants {
|
|
|
|
|
|
static let indicatorViewSize: CGFloat = 60.0
|
|
|
- static let statusViewSize: CGFloat = 60.0
|
|
|
}
|
|
|
|
|
|
// MARK: - Private variables
|
|
@@ -126,14 +115,6 @@ public class NCViewerImageContentView: UIScrollView {
|
|
|
return container
|
|
|
}()
|
|
|
|
|
|
- private lazy var statusView: UIImageView = {
|
|
|
- let statusView = UIImageView()
|
|
|
- statusView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
|
- statusView.contentMode = .scaleAspectFit
|
|
|
- statusView.clipsToBounds = true
|
|
|
- return statusView
|
|
|
- }()
|
|
|
-
|
|
|
private lazy var doubleTapGestureRecognizer: UITapGestureRecognizer = { [unowned self] in
|
|
|
let gesture = UITapGestureRecognizer(target: self, action: #selector(didDoubleTap(_:)))
|
|
|
gesture.numberOfTapsRequired = 2
|
|
@@ -168,8 +149,6 @@ extension NCViewerImageContentView {
|
|
|
|
|
|
setupIndicatorView()
|
|
|
|
|
|
- setupStatusView()
|
|
|
-
|
|
|
configureScrollView()
|
|
|
|
|
|
addGestureRecognizer(doubleTapGestureRecognizer)
|
|
@@ -222,23 +201,6 @@ extension NCViewerImageContentView {
|
|
|
|
|
|
indicatorContainer.isHidden = true
|
|
|
}
|
|
|
-
|
|
|
- private func setupStatusView() {
|
|
|
-
|
|
|
- addSubview(statusView)
|
|
|
- statusView.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- NSLayoutConstraint.activate([
|
|
|
- statusView.widthAnchor.constraint(equalToConstant: Constants.statusViewSize),
|
|
|
- statusView.heightAnchor.constraint(equalToConstant: Constants.statusViewSize),
|
|
|
- statusView.topAnchor.constraint(equalTo: imageView.topAnchor),
|
|
|
- statusView.leftAnchor.constraint(equalTo: imageView.leftAnchor)
|
|
|
- ])
|
|
|
-
|
|
|
- statusView.setNeedsLayout()
|
|
|
- statusView.layoutIfNeeded()
|
|
|
-
|
|
|
- statusView.isHidden = true
|
|
|
- }
|
|
|
|
|
|
internal func updateTransform() {
|
|
|
|