                 let fieldWidth = frame.size.width
                 let textWidth = text.sizeWithAttributes(attrs).width
                 prefixXPosition = (fieldWidth / 2) - (textWidth / 2)
+            } else if textAlignment == .Right {
+                let fieldWidth = frame.size.width
+                let textWidth = text.sizeWithAttributes(attrs).width
+                prefixXPosition = fieldWidth - textWidth
             }
             
             prefixXPosition -= (prefix! as NSString).sizeWithAttributes(attrs).width

    // Fallback text color
    private let placeHolderTextColor = UIColor(red: 120/255.0, green: 120/255.0, blue: 120/255.0, alpha: 1)
    
    override public func drawRect(rect: CGRect) {
        super.drawRect(rect)
        
        // Only draw suffix when we have a suffix and a text
        if (suffix ?? "").isEmpty == false && (text ?? "").isEmpty == false {
            

    }
    
    // A suffix string that will appear just to the right of visible text
    public var suffix:String? {
        didSet {
            setNeedsDisplay()
        }
    }
    
    // A prefix string that will appear just to the left of visible text
    public var prefix:String? {
        didSet {
            setNeedsDisplay()
        }
    }
    
    // Color for the suffix, default to the same color as the text
    public var suffixTextColor:UIColor?
