title: Using Categories in Swift and Using them in different class
body: <p>I am new to swift. I am working on creating the categories in swift. I have created one category for <code>UIColor</code>. I need to call this in some other class. Currently I am calling this by</p>
  
  <pre><code>messageview.backgroundColor = UIColor(hexaString: "31D433")
  </code></pre>
  
  <p>but it gives an error.</p>
  
  <pre><code>class Colorextension: UIColor {
      convenience init(hexaString:String) {
          self.init(
              red:   CGFloat( strtoul( String(Array(hexaString.characters)[1...2]), nil, 16) ) / 255.0,
              green: CGFloat( strtoul( String(Array(hexaString.characters)[3...4]), nil, 16) ) / 255.0,
              blue:  CGFloat( strtoul( String(Array(hexaString.characters)[5...6]), nil, 16) ) / 255.0, alpha: 1 )
      }
  }
  </code></pre>