diff --git a/IGRPhotoTweaks/PhotoTweakView/CropView/IGRCropView+Lines.swift b/IGRPhotoTweaks/PhotoTweakView/CropView/IGRCropView+Lines.swift index 3429bbb..42cc0a9 100644 --- a/IGRPhotoTweaks/PhotoTweakView/CropView/IGRCropView+Lines.swift +++ b/IGRPhotoTweaks/PhotoTweakView/CropView/IGRCropView+Lines.swift @@ -10,7 +10,7 @@ import Foundation extension IGRCropView { - internal func seetupLines() { + internal func setupLines() { self.dismiss(self.horizontalCropLines) self.dismiss(self.verticalCropLines) self.dismiss(self.horizontalGridLines) diff --git a/IGRPhotoTweaks/PhotoTweakView/CropView/IGRCropView.swift b/IGRPhotoTweaks/PhotoTweakView/CropView/IGRCropView.swift index acadf3a..9a4e74d 100644 --- a/IGRPhotoTweaks/PhotoTweakView/CropView/IGRCropView.swift +++ b/IGRPhotoTweaks/PhotoTweakView/CropView/IGRCropView.swift @@ -104,7 +104,7 @@ public class IGRCropView: UIView { fileprivate func setup() { - self.seetupLines() + self.setupLines() let upperLeft = IGRCropCornerView(cornerType: .upperLeft, lineWidth: cornerBorderWidth, diff --git a/IGRPhotoTweaks/PhotoTweakView/IGRPhotoTweakView.swift b/IGRPhotoTweaks/PhotoTweakView/IGRPhotoTweakView.swift index 97110c9..1ae2880 100644 --- a/IGRPhotoTweaks/PhotoTweakView/IGRPhotoTweakView.swift +++ b/IGRPhotoTweaks/PhotoTweakView/IGRPhotoTweakView.swift @@ -128,7 +128,13 @@ public class IGRPhotoTweakView: UIView { public override func layoutSubviews() { super.layoutSubviews() - self.originalSize = self.maxBounds().size + if !manualMove { + self.originalSize = self.maxBounds().size + self.scrollView.center = CGPoint(x: (self.frame.width * 0.5), y: self.centerY) + + self.cropView.center = self.scrollView.center + self.scrollView.checkContentOffset() + } } //MARK: - Public FUNCs