|
LuxChat
2.0
Instant messenger for iOS
|
#import <JVFloatLabeledTextField.h>
Instance Methods | |
| (void) | - setPlaceholder:floatingTitle: |
Properties | |
| UILabel * | floatingLabel |
| IBInspectable CGFloat | floatingLabelYPadding |
| IBInspectable CGFloat | floatingLabelXPadding |
| IBInspectable CGFloat | placeholderYPadding |
| UIFont * | floatingLabelFont |
| IBInspectable UIColor * | floatingLabelTextColor |
| IBInspectable UIColor * | floatingLabelActiveTextColor |
| IBInspectable BOOL | animateEvenIfNotFirstResponder |
| NSTimeInterval | floatingLabelShowAnimationDuration |
| NSTimeInterval | floatingLabelHideAnimationDuration |
| IBInspectable BOOL | adjustsClearButtonRect |
| IBInspectable BOOL | keepBaseline |
JVFloatLabeledTextField is a UITextField subclass that implements the "Float Label Pattern".
Due to space constraints on mobile devices, it is common to rely solely on placeholders as a means to label fields. This presents a UX problem, in that, once the user begins to fill out a form, no labels are present.
JVFloatLabeledTextField aims to improve the user experience by having placeholders transition into "floating labels" that hover above the text field after it is populated with text.
JVFloatLabeledTextField supports iOS 6+.
Credits for the concept to Matt D. Smith (), and his original design: http://mattdsmith.com/float-label-pattern/
| - (void) setPlaceholder: | (NSString *) | placeholder | |
| floatingTitle: | (NSString *) | floatingTitle | |
Sets the placeholder and the floating title
| placeholder | The string that to be shown in the text field when no other text is present. |
| floatingTitle | The string to be shown above the text field once it has been populated with text by the user. |
|
readwritenonatomicassign |
Indicates whether the clearButton position is adjusted to align with the text Defaults to 1.
|
readwritenonatomicassign |
Indicates whether the floating label's appearance should be animated regardless of first responder status. By default, animation only occurs if the text field is a first responder.
|
readnonatomicstrong |
Read-only access to the floating label.
|
readwritenonatomicstrong |
Text color to be applied to the floating label while the field is a first responder. Tint color is used by default if an floatingLabelActiveTextColor is not provided.
|
readwritenonatomicstrong |
Font to be applied to the floating label. Defaults to the first applicable of the following:
|
readwritenonatomicassign |
Duration of the animation when hiding the floating label. Defaults to 0.3 seconds.
|
readwritenonatomicassign |
Duration of the animation when showing the floating label. Defaults to 0.3 seconds.
|
readwritenonatomicstrong |
Text color to be applied to the floating label. Defaults to [UIColor grayColor].
|
readwritenonatomicassign |
Padding to be applied to the x coordinate of the floating label upon presentation. Defaults to zero
|
readwritenonatomicassign |
Padding to be applied to the y coordinate of the floating label upon presentation. Defaults to zero.
|
readwritenonatomicassign |
Indicates whether or not to drop the baseline when entering text. Setting to YES (not the default) means the standard greyed-out placeholder will be aligned with the entered text Defaults to NO (standard placeholder will be above whatever text is entered)
|
readwritenonatomicassign |
Padding to be applied to the y coordinate of the placeholder. Defaults to zero.
1.8.9.1