resize current image after rotation device

This commit is contained in:
Alexsandersky 2016-03-09 17:54:13 +04:00
parent da03786f9a
commit ecc129c323
1 changed files with 13 additions and 1 deletions

View File

@ -276,10 +276,22 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate {
pagingScrollView.frame = frameForPagingScrollView()
pagingScrollView.contentSize = contentSizeForPagingScrollView()
if visiblePages.count > 0 {
for page in visiblePages {
page.frame = frameForPageAtIndex(currentPageIndex)
page.setMaxMinZoomScalesForCurrentBounds()
if page.captionView != nil {
page.captionView.frame = frameForCaptionView(page.captionView, index: currentPageIndex)
}
}
}
pagingScrollView.contentOffset = contentOffsetForPageAtIndex(currentPageIndex)
toolBar.frame = frameForToolbarAtOrientation()
// where did start
didStartViewingPageAtIndex(currentPageIndex)
isPerformingLayout = false
}