this new algorithm resizes the current image after device rotation

This commit is contained in:
Alexsander Khitev 2016-03-13 19:58:37 +04:00
parent cc1aa7d3d4
commit d329c86aee
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SKPhotoBrowser"
s.version = "1.6.8"
s.version = "1.6.9"
s.summary = "Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift2.0."
s.homepage = "https://github.com/suzuki-0000/SKPhotoBrowser"
s.license = { :type => "MIT", :file => "LICENSE" }

View File

@ -287,10 +287,11 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate {
// this algorithm resizes the current image after device rotation
if visiblePages.count > 0 {
for page in visiblePages {
page.frame = frameForPageAtIndex(currentPageIndex)
let pageIndex = page.tag - pageIndexTagOffset
page.frame = frameForPageAtIndex(pageIndex)
page.setMaxMinZoomScalesForCurrentBounds()
if page.captionView != nil {
page.captionView.frame = frameForCaptionView(page.captionView, index: currentPageIndex)
page.captionView.frame = frameForCaptionView(page.captionView, index: pageIndex)
}
}
}