title: IBInspectable Creating a Dropdown and better Organization
body: <p>In short, I would like to create an <code>@IBInspectable</code> property that allows you to select from a list of things in a drop down menu when you are in Storyboards. Also if there is a way to create dividers and better organize the <code>IBInspectables</code> I would like to know if this is possible too. In my example, I would like to create regex strings for a phone number so that when I go to the storyboard I can just select the "<strong>phone number</strong>" item in a drop down menu instead of entering a regex string.</p>
  
  <p>Currently I have subclassed a <code>TextField</code> so that I can add even more <code>IBInspectables</code> to it like regex (which you can see in the picture). So as it stands this is what I have for my subclassed <code>UITextField</code>:</p>
  
  <pre><code>@IBDesignable public class FRM_TextField: UITextField {
  
  
  @IBInspectable public var regex : String?
  
  public var isValid : Bool{
      if let unwrappedRegex = regex{
          let applied_regex_expression = NSRegularExpression.regularExpressionWithPattern(unwrappedRegex, options: nil, error: nil)
  
          let numberOfMatches = applied_regex_expression?.numberOfMatchesInString(text, options: nil, range: NSMakeRange(0, countElements(text)))
  
  
          if(numberOfMatches &gt; 0 ){
                  return true
          }else{
                  return false
          }
      }
      return false
  }
  
    public required init(coder aDecoder: NSCoder) {
       super.init(coder: aDecoder)
  }
  
    public override init(){
       super.init();
  }
  
    public override init(frame: CGRect) {
       super.init(frame: frame)
    }   
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/AAXpo.png" alt="Regex Toolbar"></p>