title: How to create UIView class in Swift
body: <p>I'm new to Swift, come from Obj-C</p>
  
  <p>I'm looking at the net, but to no avail ....</p>
  
  <p>Obj-C in my project I created a class UIView (served as a notification that appeared red from the bottom) with a custom instancetype because through this allocavo the UIView directly in viewController with the parameters that I was interested .. Now I can not absolutely to create the translation of my code in Obj-C swift was trying to find a tutorial or something visual that I could figure out how to create a class with swift UIView without using a xib ...</p>
  
  <p>Does anyone know any tutorial or example of class UIView without XIB in Swift?</p>
  
  <p>My problem is that when I insert this custom init
   </p>
  
  <pre><code>init (title:String, message:String) {
           // init
        }
  </code></pre>
  
  <p>first of all it returns an error because the compiler wants this also included</p>
  
  <pre><code>required init (coder aDecoder: NSCoder) {
           super.init (coder: aDecoder)
       }
  </code></pre>
  
  <p>My first question is this:</p>
  
  <p>initWithCoder in obj-c was used only if my custom view was inserted in the storyboard ...</p>
  
  <p>however in my case I would call all my custom view, in my view controller, through a simple line of code as I did in obj-c and that I was not allowed in because obj-c I used a custom instancetype without specifying them a initWithCoder it initWithFrame</p>
  
  <p>I can not understand how this thing</p>