title: Swift subclass UIView
body: <p>I want to subclass <code>UIView</code> and show a login like view. I've created this in Objective-C, but now I want to port it to Swift. I do not use storyboards, so I create all my UI in code.</p>
  <p>But the first problem is that I must implement <code>initWithCoder</code>. I gave it a default implementation since It won't be called. Now when I run the program it crashes, because I've to implement <code>initWithFrame</code> as well. Now I got this:</p>
  <pre><code>override init() {
      super.init()
      println(&quot;Default init&quot;)
  }
  
  override init(frame: CGRect) {
      super.init(frame: frame)
      println(&quot;Frame init&quot;)
  }
  
  required init(coder aDecoder: NSCoder) {
      super.init(coder: aDecoder)
      println(&quot;Coder init&quot;)
  }
  </code></pre>
  <p>My question is where should I create my textfield etc... and if I never implement frame and coder how can I &quot;hide&quot; this?</p>