Skip to content

Commit

Permalink
Dictionary enumeration isn't ordered, so use a while loop with indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
kobim committed Aug 30, 2015
1 parent b87d031 commit c52eaa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SLPagingViewSwift/SLPagingViewSwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public class SLPagingViewSwift: UIViewController, UIScrollViewDelegate {
let height = self.view.frame.height
self.scrollView.contentSize = CGSize(width: width, height: height)
var i: Int = 0
for (key, v) in self.views {
while let v = views[i] {
v.frame = CGRectMake(self.SCREENSIZE.width * CGFloat(i), 0, self.SCREENSIZE.width, self.SCREENSIZE.height)
self.scrollView.addSubview(v)
i++
Expand Down

0 comments on commit c52eaa3

Please sign in to comment.