Fixing a few errors, adding support for attributedPlaceholder

I beg to differ. Try commenting out this addition, and then:
- add some text to the field
- click the (x) button to clear

The float label will not animate to hidden, but just disappear. The change above causes the animation to start just before the last character disappears.

I wonder if we're seeing different behaviour because we're on different versions of iOS? I'm 7.1...