From 3cd3b00d3085f7b08dff8cd0efc301e1144893cc Mon Sep 17 00:00:00 2001 From: Alexsander Khitev Date: Wed, 23 Mar 2016 22:45:40 +0400 Subject: [PATCH] update for new swift style --- SKPhotoBrowser/SKPhotoBrowser.swift | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/SKPhotoBrowser/SKPhotoBrowser.swift b/SKPhotoBrowser/SKPhotoBrowser.swift index 08e07a2..3019340 100644 --- a/SKPhotoBrowser/SKPhotoBrowser.swift +++ b/SKPhotoBrowser/SKPhotoBrowser.swift @@ -1031,28 +1031,7 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate { } // this is a new style but it works very slow -// for index in 0...lastIndex { -// if isDisplayingPageForIndex(index) { -// continue -// } -// -// let page = SKZoomingScrollView(frame: view.frame, browser: self) -// page.frame = frameForPageAtIndex(index) -// page.tag = index + pageIndexTagOffset -// page.photo = photoAtIndex(index) -// -// visiblePages.append(page) -// pagingScrollView.addSubview(page) -// // if exists caption, insert -// if let captionView = captionViewForPhotoAtIndex(index) { -// captionView.frame = frameForCaptionView(captionView, index: index) -// pagingScrollView.addSubview(captionView) -// // ref val for control -// page.captionView = captionView -// } -// } - - for var index = firstIndex; index <= lastIndex; index += 1 { + for index in firstIndex...lastIndex { if isDisplayingPageForIndex(index) { continue }