             photoM.append(modal)
         }
         return photoM
+    }
+}
+//MARK: - 下载进度指示器
+class ActivityView: UIView {
+    //MARK: - 属性
+    // 进度
+    var progress  = 0.0 {
+        didSet {
+            setNeedsDisplay()
+        }
+    }
+    // 线长度
+    var lineWidth : CGFloat = 5.0
+    // 线颜色
+    var lineColor : UIColor = UIColor.whiteColor()
+    
+    override func drawRect(rect: CGRect) {
+        // Drawing code
+        let size = rect.size
+        let centerPoint = CGPointMake(size.width * 0.5, size.height * 0.5)
+        let r = CGFloat((min(size.width, size.height) - lineWidth - 5.0) * 0.5)
+        let start = CGFloat(-M_PI_2)
+        let end = CGFloat(2 * M_PI * progress + Double(start))
+        
+        let path = UIBezierPath(arcCenter: centerPoint, radius: r, startAngle: start, endAngle: end, clockwise: true)
+        
+        path.lineWidth = lineWidth
+        path.lineCapStyle = kCGLineCapRound
+        
+        lineColor.setStroke()
+        
+        path.stroke()
+        
     }
 }
 //MARK: - 常量列表

        }
    }
    // 小图URL
    var smallURL : NSURL?
    // 当前索引
    var index : Int?
    
    //MARK: - 内部方法
    override func loadView() {

            largeURL = photo?.largeURL
        }
    }
    private lazy var activity : ActivityView = {
        let activity = ActivityView(frame: CGRectMake(0, 0, 44, 44))
        activity.layer.cornerRadius = 22
        activity.layer.masksToBounds = true
        activity.backgroundColor = activityBackgroundColor
        activity.lineWidth = activityLineWidth
        activity.lineColor = activityLineColor
        activity.center = CGPointMake(UIScreen.mainScreen().bounds.width * 0.5, UIScreen.mainScreen().bounds.height * 0.5)
        
        self.view.addSubview(activity)
        return activity
    }()
    /// 滚动视图
    private lazy var scrollView : UIScrollView = {
        let sv = UIScrollView(frame: UIScreen.mainScreen().bounds)
        // 设置代理
        sv.delegate = self
