title: EXC_BAD_ACCESS error at init(coder aDecoder:) line in swift2
body: <p><a href="https://i.stack.imgur.com/y1Dwk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y1Dwk.png" alt="init(coder aDecoder:)" /></a></p>
  <p>I can't exactly understand what have I done wrong. I tried removing the optional(?) but with no results.</p>
  <p><a href="https://i.stack.imgur.com/ptaVa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ptaVa.png" alt="Image showing error after '?' removed" /></a></p>
  <p>Here's the total code of my Custom View :-</p>
  <pre><code>class CustomView: UIView {
  
      var vieww: UIView!
  
      override init(frame: CGRect) {
          super.init(frame: frame)
          setupView()
      }
  
      required init?(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          setupView()
      }
  
      func loadViewFromib () -&gt; UIView {
          let bundle = NSBundle(forClass: self.dynamicType)
          let nib = UINib(nibName: NSStringFromClass(self.dynamicType).componentsSeparatedByString(&quot;.&quot;).last!, bundle: bundle)
          let view = nib.instantiateWithOwner(self, options: nil).first as! UIView
      
          return view
      }
  
      func setupView() {
          vieww = loadViewFromib()
      
          vieww.frame = CGRectMake(0, 0, 300, 150)
          vieww.center = center
          addSubview(vieww)
      
          /// Adds a shadow to our view
          vieww.layer.cornerRadius = 4.0
          vieww.layer.shadowColor = UIColor.blackColor().CGColor
          vieww.layer.shadowOpacity = 0.2
          vieww.layer.shadowRadius = 4.0
          vieww.layer.shadowOffset = CGSizeMake(0.0, 8.0)
      }
  </code></pre>
  <p>I am new to swift and don't know what to do exactly. Please help me out.</p>
  <p>Thanks in advance.</p>