         let cellWidth = Int(self.view.frame.width / CGFloat(cols))
         let cellHeight = Int(self.view.frame.height / CGFloat(rows))
         
-        for i in 0 ..< activityTypes.count {
-            let x = i % cols * cellWidth
-            let y = i / cols * cellHeight
+        (NVActivityIndicatorType.BallPulse.rawValue ... NVActivityIndicatorType.Orbit.rawValue).forEach {
+            let x = ($0 - 1) % cols * cellWidth
+            let y = ($0 - 1) / cols * cellHeight
             let frame = CGRect(x: x, y: y, width: cellWidth, height: cellHeight)
             let activityIndicatorView = NVActivityIndicatorView(frame: frame,
-                type: activityTypes[i])
+                type: NVActivityIndicatorType(rawValue: $0)!)
             let animationTypeLabel = UILabel(frame: frame)
             
-            animationTypeLabel.text = String(i + 1)
+            animationTypeLabel.text = String($0)
             animationTypeLabel.sizeToFit()
             animationTypeLabel.textColor = UIColor.whiteColor()
             animationTypeLabel.frame.origin.x += 5
             animationTypeLabel.frame.origin.y += CGFloat(cellHeight) - animationTypeLabel.frame.size.height
             
             activityIndicatorView.padding = 20
+            if ($0 == NVActivityIndicatorType.Orbit.rawValue) {
+                activityIndicatorView.padding = 0
+            }
             self.view.addSubview(activityIndicatorView)
             self.view.addSubview(animationTypeLabel)
             activityIndicatorView.startAnimation()
             
             let button:UIButton = UIButton(frame: frame)
-            button.tag = i
+            button.tag = $0
             button.addTarget(self,
                 action: #selector(buttonTapped(_:)),
                 forControlEvents: UIControlEvents.TouchUpInside)

    }
    
    func buttonTapped(sender: UIButton) {
        startActivityAnimating("Loading...", type: activityTypes[sender.tag])
        performSelector(#selector(delayedStopActivity),
            withObject: nil,
            afterDelay: 2.5)

    func delayedStopActivity() {
        stopActivityAnimating()
    }
}

