Skip to content

Commit

Permalink
增加currentIndex的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
郑国凯 authored and 郑国凯 committed Jan 29, 2016
1 parent 3ca10bd commit e7ecdb4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Binary file not shown.
11 changes: 10 additions & 1 deletion TestPageViewController/FECustomPageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,16 @@ class FECustomPageViewController: UIViewController, UIPageViewControllerDelegate
/// 图片列表
var list_image: [UIImage]!
/// 当前图片的下标
var currentIndex: Int = 0
var currentIndex: Int = 0 {
didSet {

guard self.currentIndex < 0 && self.currentIndex >= self.list_image.count
else { return }

currentIndex = 0

}
}
/// 双击的缩放比例
var scaleForDoubleTap: CGFloat = 2.0
/// 非当前的圆点的颜色
Expand Down

0 comments on commit e7ecdb4

Please sign in to comment.