         didSet{
             switch(pageControlMode){
             case .Left:
-                pageControl.frame = CGRectMake(10, contentScrollView.frame.origin.y + contentScrollView.frame.size.height - 30, 20 * CGFloat(imageArray.count), 20)
+                pageControl.frame = CGRectMake(10, contentScrollView.frame.origin.y + contentScrollView.frame.size.height - 30, 20 * CGFloat(imageCount), 20)
             case .Center:
-                pageControl.frame = CGRectMake((screen_width - 20 * CGFloat(imageArray.count)) / 2, contentScrollView.frame.origin.y + contentScrollView.frame.size.height - 30, 20 * CGFloat(imageArray.count), 20)
+                pageControl.frame = CGRectMake((screen_width - 20 * CGFloat(imageCount)) / 2, contentScrollView.frame.origin.y + contentScrollView.frame.size.height - 30, 20 * CGFloat(imageCount), 20)
             case .Right:
-                pageControl.frame = CGRectMake(screen_width - 10 - 20 * CGFloat(imageArray.count), contentScrollView.frame.origin.y + contentScrollView.frame.size.height - 30, 20 * CGFloat(imageArray.count), 20)
+                pageControl.frame = CGRectMake(screen_width - 10 - 20 * CGFloat(imageCount), contentScrollView.frame.origin.y + contentScrollView.frame.size.height - 30, 20 * CGFloat(imageCount), 20)
             }
-            contentScrollView.scrollEnabled = imageArray.count > 1
-            pageControl.numberOfPages = imageArray.count
+            contentScrollView.scrollEnabled = imageCount > 1
+            pageControl.numberOfPages = imageCount
             //设置定时器
-            if imageArray.count <= 1{
+            if imageCount <= 1{
                 removeTimer()
             }
         }

    //得到下一张图片的索引
    private func getNextImageIndex(indexOfCurrentImage index: Int) -> Int{
        let tempIndex = index + 1
        return tempIndex < imageArray.count ? tempIndex : 0
    }
    
    //事件触发方法

//

import UIKit
import AFImageHelper

public enum UIPageControlMode : Int {
    case Left
