     }
     
 }
-
-// MARK: - Extensions
-extension Array {
-    
-    subscript (safe index: Int) -> T? {
-        return indices(self) ~= index ? self[index] : nil
-    }
-    
-}

    
    var items = [String]()
    
    var isShown = false
    
    // configuration
    var animationDuration: NSTimeInterval = 0.5
    var maskBackgroundColor: UIColor = .blackColor()

    
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell = UITableViewCell(style: .Value1, reuseIdentifier: "UITableViewCell")
        cell.textLabel?.text = items[indexPath.row]
        return cell
    }
    
