       self.layer.addSublayer(layer)
     }
   }
-  
+
   private func setupBottomBorder() {
     if let existingBorder = self.borderBottomLayer {
       existingBorder.removeFromSuperlayer()
     }
-    
+
     if self.borderBottom && self.borderBottomColor != nil && self.borderBottomWidth > 0 {
       let layer = CALayer()
       layer.backgroundColor = self.borderBottomColor!.CGColor

    super.init(coder: aDecoder)
    self.setupView()
  }
  
  private func setupView() {
    self.setupTopBorder()
    self.setupBottomBorder()
  }
  
  private func setupTopBorder() {
    if let existingBorder = self.borderTopLayer {
      existingBorder.removeFromSuperlayer()
    }
    
    if self.borderTop && self.borderTopColor != nil && self.borderTopWidth > 0 {
      let layer = CALayer()
      layer.backgroundColor = self.borderTopColor!.CGColor

  var normalBackgroundColor: UIColor? = nil
  var borderTopLayer: CALayer?
  var borderBottomLayer: CALayer?

  var borderTopInset: UIEdgeInsets = UIEdgeInsetsZero {
    didSet {
      self.setupTopBorder()
    }
  }

  var borderBottomInset: UIEdgeInsets = UIEdgeInsetsZero {
    didSet {
      self.setupBottomBorder()
    }
  }

  var borderTopWidth: CGFloat = CGFloat.NaN {
    didSet {
      self.setupTopBorder()
    }
  }

  var borderBottomWidth: CGFloat = CGFloat.NaN {
    didSet {
      self.setupBottomBorder()
    }
  }

  var borderTopColor: UIColor? = nil {
    didSet {
      self.setupTopBorder()
    }
  }

  var borderBottomColor: UIColor? = nil {
    didSet {
      self.setupBottomBorder()
    }
  }

  var borderTop: Bool = false {
    didSet {
      self.setupTopBorder()
    }
  }

  var borderBottom: Bool = false {
    didSet {
      self.setupBottomBorder()
    }
  }

  override public init(style: UITableViewCellStyle, reuseIdentifier: String?) {
    super.init(style: style, reuseIdentifier: reuseIdentifier)
    self.setupView()
  }
