MaterialTextField
MaterialTextField copied to clipboard
Show error label in designable view
Currently prepareForInterfaceBuilder
hides the error label because I was unable to get it to show up correctly in the storyboard.
Steps to fix:
-
Currently the
error
property is of typeNSError
, but the localized description is the only thing that's used inMFTextField
so it could be changed to a string instead. -
Making the error an
NSString
instead of anNSError
would allow the property to be made inspectable. The error string could then be set in the storyboard. -
prepareForInterfaceBuilder
could be updated to not remove the error label anymore and callsharedInit
instead.
Considerations: This would be a breaking change to the API.