 
 private class ActionSheetItemView: UIView {
   var subview: UIView?
-  
+
   required init(coder aDecoder: NSCoder) {
     super.init(coder: aDecoder)!
     self.setting()
   }
-  
+
   override init(frame: CGRect) {
     super.init(frame: frame)
     self.setting()
   }
-  
+
   init() {
-    super.init(frame: CGRectZero)
+    super.init(frame: CGRect.zero)
     self.setting()
   }
-  
+
   func setting() {
     self.clipsToBounds = true
   }
-  
+
   override func addSubview(view: UIView) {
     super.addSubview(view)
     self.subview = view
   }
-  
+
   override func layoutSubviews() {
     super.layoutSubviews()
     if let subview = self.subview {

}

public class CustomizableActionSheet: NSObject {
  
  // MARK: - Private properties
  
  private static var actionSheets = [CustomizableActionSheet]()
  private static let kCornerRadius: CGFloat = 4
  private static let kMarginSide: CGFloat = 8
  private static let kMarginBottom: CGFloat = 8
  private var items: [CustomizableActionSheetItem]?
  private let maskView = UIView()
  private let itemContainerView = UIView()
  private var closeBlock: (() -> Void)?
  
  // MARK: - Public properties
  
  public func showInView(targetView: UIView, items: [CustomizableActionSheetItem], closeBlock: (() -> Void)? = nil) {
    // Save instance to reaction until closing this sheet
    CustomizableActionSheet.actionSheets.append(self)
    
    let screenBounds = UIScreen.mainScreen().bounds
    
    // Save closeBlock
    self.closeBlock = closeBlock
    
    // mask view
    let maskViewTapGesture = UITapGestureRecognizer(target: self, action: #selector(CustomizableActionSheet.maskViewWasTapped))
    self.maskView.addGestureRecognizer(maskViewTapGesture)
    self.maskView.frame = screenBounds
    self.maskView.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)
    targetView.addSubview(self.maskView)
    
    // set items
    for subview in self.itemContainerView.subviews {
      subview.removeFromSuperview()
    }
    var currentPosition: CGFloat = 0
    for item in items {
      switch (item.type) {
      case .Button:
        let button = UIButton()

            break
          }
        }

        self.closeBlock?()
    }
  }

  // MARK: - Private methods

  @objc private func maskViewWasTapped() {
    self.dismiss()
  }

  @objc private func buttonWasTapped(sender: AnyObject) {
    guard let items = self.items else {
      return
