 //        }
 //    }
 
-    public var hashValue: Int {
-        return self.toString().hashValue
+
+    func toString() -> String {
+        let strSelf = String(self)
+        if let index = strSelf.characters.indexOf("(") {
+            return String(self).substringToIndex(index)
+        }
+        return strSelf
     }
 
     private func attributedStringFromList(attrList: [Attributes]) -> NSAttributedString? {

    }
}

public func ==(lhs: Appearance, rhs: Appearance) -> Bool {
    // TODO: how to implement the real equatable


    case custom([String: AnyObject])
    case none

    func apply<Component: UIView>(to component: Component, useDefaultValue: Bool = false) {

        switch (self, component) {
        // UIView
        case (let .backgroundColor(color), _):
            component.backgroundColor = useDefaultValue ? nil : color
        case (let .userInteractionEnabled(userInteractionEnabled), _):
            component.userInteractionEnabled = userInteractionEnabled
        case (let .translatesAutoresizingMaskIntoConstraints(should), _):
            component.translatesAutoresizingMaskIntoConstraints = should
        case (let .tintColor(color), _):
            component.tintColor = color
        case (let .tintAdjustmentMode(mode), _):
            component.tintAdjustmentMode = mode
        case (let .cornerRadius(radius), _):
            component.layer.cornerRadius = radius
        case (let .borderWidth(borderWidth), _):
            component.layer.borderWidth = borderWidth
        case (let .borderColor(borderColor), _):
            component.layer.borderColor = borderColor.CGColor
        case (let .multipleTouchEnabled(multipleTouchEnabled), _):
            component.multipleTouchEnabled = multipleTouchEnabled
        case (let .exclusiveTouch(exclusiveTouch), _):
            component.exclusiveTouch = exclusiveTouch
        case (let .clipsToBounds(clipsToBounds), _):
            component.clipsToBounds = clipsToBounds
        case (let .alpha(alpha), _):
            component.alpha = alpha
        case (let .opaque(opaque), _):
            component.opaque = opaque
        case (let .hidden(hidden), _):
            component.hidden = hidden
        case (let .clearsContextBeforeDrawing(clearsContextBeforeDrawing), _):
            component.clearsContextBeforeDrawing = clearsContextBeforeDrawing
        case (let .contentMode(contentMode), _):
            component.contentMode = contentMode

        // UIControl
        case (let .enabled(enabled), let control as UIControl):
            control.enabled = enabled
        case (let .selected(selected), let control as UIControl):
            control.selected = selected
        case (let .highlighted(highlighted), let control as UIControl):
            control.highlighted = highlighted
        case (let .contentVerticalAlignment(contentVerticalAlignment), let control as UIControl):
            control.contentVerticalAlignment = contentVerticalAlignment
        case (let .contentHorizontalAlignment(contentHorizontalAlignment), let control as UIControl):
            control.contentHorizontalAlignment = contentHorizontalAlignment

        // UILabel
        case (let .font(font), let label as UILabel):
            label.font = font
        case (let .textColor(color), let label as UILabel):
            label.textColor = color
        case (let .textAlignment(align), let label as UILabel):
            label.textAlignment = align
        case (let .numberOfLines(number), let label as UILabel):
            label.numberOfLines = number
        case (let .defaultLabelText(text), let label as UILabel):
            label.text = text
        case (let .attributedText(attributes), let label as UILabel):
            label.attributedText = attributedStringFromList(attributes)

        // UITextView
        case (let .selectedRange(range), let textView as UITextView):
            textView.selectedRange = range
        case (let .editable(editable), let textView as UITextView):
            textView.editable = editable
        case (let .selectable(selectable), let textView as UITextView):
            textView.selectable = selectable
        case (let .dataDetectorTypes(types), let textView as UITextView):
            textView.dataDetectorTypes = types
        case (let .allowsEditingTextAttributes(allows), let textView as UITextView):
            textView.allowsEditingTextAttributes = allows
        case (let .clearsOnInsertion(clearsOnInsertion), let textView as UITextView):
            textView.clearsOnInsertion = clearsOnInsertion
        case (let .textContainerInset(inset), let textView as UITextView):
            textView.textContainerInset = inset
        case (let .linkTextAttributes(attrs), let textView as UITextView):
            textView.linkTextAttributes = attrs

        // UIButton
        case (let .buttonType(type), let button as UIButton):
