title: Custom class that inherits from UITextField does not work (with custom init) in Swift
body: <p>So the title says it all. I am trying to create a class that explicitly inherits from UITextField. This is because I want to do some customization to my UITextFields. My main goal though, is to create a custom initializer for the class, however, I run into trouble by doing so.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import UIKit
  
  class CustomTextField: UITextField {
  
      //Class variables
  
      required init(coder decoder: NSCoder, other:String) {
          super.init(coder: decoder)
          self.layer.cornerRadius = 15
          println("Instantiated")
          println(other)
  
      }
  }
  </code></pre>
  
  <p>But the compiler complains with: <code>'required' initializer 'init(coder:)' must be provided by subclass of 'UITextField'</code>. Then I go ahead and apply the suggested fix for the problem, and it adds the following code right below my required init code:</p>
  
  <pre><code>required init(coder aDecoder: NSCoder) {
          fatalError("init(coder:) has not been implemented")
      }
  </code></pre>
  
  <p>My code above never prints "Instantiated"</p>
  
  <p>Could you please help me out? My ideal class would receive at least another 2 arguments in the initializer (besides the coder-NSCoder one). I don't get why I can't get this to work (maybe I am too used to Java, where doing this is easier).</p>
  
  <p>Thank you so much for your help in advance!</p>
  
  <p>Cheers!</p>