new algorithm for resize image
This commit is contained in:
parent
689b312e10
commit
cc1aa7d3d4
|
|
@ -287,13 +287,10 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate {
|
|||
// this algorithm resizes the current image after device rotation
|
||||
if visiblePages.count > 0 {
|
||||
for page in visiblePages {
|
||||
let pageIndex = page.tag - pageIndexTagOffset
|
||||
print(pageIndex)
|
||||
let page = visiblePages[visiblePages.count-1]
|
||||
page.frame = frameForPageAtIndex(currentPageIndex)
|
||||
page.setMaxMinZoomScalesForCurrentBounds()
|
||||
if page.captionView != nil {
|
||||
page.captionView.frame = frameForCaptionView(page.captionView, index: pageIndex)
|
||||
page.captionView.frame = frameForCaptionView(page.captionView, index: currentPageIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
|
@ -32,11 +30,14 @@
|
|||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
|
|
|
|||
Loading…
Reference in New Issue