Skip to content
This repository has been archived by the owner on Nov 22, 2020. It is now read-only.

Commit

Permalink
Fixed bug with placeholder label getting contracted when active
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtSabintsev committed Nov 10, 2015
1 parent 578c181 commit 8d18eff
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
11 changes: 4 additions & 7 deletions README.md
@@ -1,19 +1,16 @@
# UIFloatLabelTextField
### A subclassed UITextField that implements the Float Label UI design pattern.
### A subclassed UITextField that implements the Float Label UI design pattern.
___

## Note
If you are looking for the `UITextView` equivalent of this class, please visit my [UIFloatLabelTextView](http://www.github.com/ArtSabintsev/UIFloatLabelTextView) repository.

## About
In 2013, [**Matt D. Smith**](http://twitter.com/mds) unveiled the **[Float Label](http://www.floatlabel.com)** user interface design pattern. In short, it retains a text field's placeholder above said text field as a *floating label*. This label is brightly colored when the field is active, and dimly colored when a user has finished editing that field.
In 2013, [**Matt D. Smith**](http://twitter.com/mds) unveiled the **[Float Label](http://www.floatlabel.com)** user interface design pattern. In short, it retains a text field's placeholder above said text field as a *floating label*. This label is brightly colored when the field is active, and dimly colored when a user has finished editing that field.

![Sample Gif of Library in Action](http://d13yacurqjgara.cloudfront.net/users/6410/screenshots/1254439/form-animation-_gif_.gif)

Image credit: [Matt D. Smith](http://twitter.com/mds).

## Changelog (v1.2.1)
- Exposed `horizontalPadding` variable to public interface.
Image credit: [Matt D. Smith](http://twitter.com/mds).

## Features
- Works with all view `init` styles
Expand All @@ -39,7 +36,7 @@ Check out `UIFloatLabelTextField.h` for a full list of editable properties. Also
I want to credit [**Jared Verdi**](http://twitter.com/jverdi) for developing the first iOS implementation of this pattern in his [**JVFloatLabeledTextField**](https://github.com/jverdi/JVFloatLabeledTextField) project. I used it as a reference to make this version, but executed most aspects differently. I also added many other features that I personally needed, and plan on continuing to enhance this library over time.

## Created and maintained by
[Arthur Ariel Sabintsev](http://www.sabintsev.com/)
[Arthur Ariel Sabintsev](http://www.sabintsev.com/)

## License
Please refer to the **LICENSE** file.
Expand Up @@ -138,7 +138,7 @@
8E648D5A18D2A4FE00A892FB /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0510;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "Arthur Ariel Sabintsev";
};
buildConfigurationList = 8E648D5D18D2A4FE00A892FB /* Build configuration list for PBXProject "UIFloatLabelSampleApp" */;
Expand Down Expand Up @@ -215,6 +215,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
Expand Down Expand Up @@ -276,6 +277,7 @@
GCC_PREFIX_HEADER = "UIFloatLabelSampleApp/UIFloatLabelSampleApp-Prefix.pch";
INFOPLIST_FILE = "UIFloatLabelSampleApp/UIFloatLabelSampleApp-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.sabintsev.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -290,6 +292,7 @@
GCC_PREFIX_HEADER = "UIFloatLabelSampleApp/UIFloatLabelSampleApp-Prefix.pch";
INFOPLIST_FILE = "UIFloatLabelSampleApp/UIFloatLabelSampleApp-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.sabintsev.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.sabintsev.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
4 changes: 2 additions & 2 deletions UIFloatLabelTextField.podspec
@@ -1,10 +1,10 @@
Pod::Spec.new do |s|
s.name = "UIFloatLabelTextField"
s.version = "1.2.1"
s.version = "1.2.2"
s.summary = "A subclassed UITextField that implements the Float Label UI design pattern."
s.homepage = "https://github.com/ArtSabintsev/UIFloatLabelTextField"
s.platform = :ios, '7.0'
s.source = { :git => "https://github.com/ArtSabintsev/UIFloatLabelTextField.git", :tag => "1.2.1" }
s.source = { :git => "https://github.com/ArtSabintsev/UIFloatLabelTextField.git", :tag => s.version.to_s }
s.source_files = 'UIFloatLabelTextField/*.{h,m}'
s.requires_arc = true
s.social_media_url = 'https://twitter.com/ArtSabintsev'
Expand Down
1 change: 1 addition & 0 deletions UIFloatLabelTextField/UIFloatLabelTextField.m
Expand Up @@ -317,6 +317,7 @@ - (void)setFloatLabelFont:(UIFont *)floatLabelFont
{
_floatLabelFont = floatLabelFont;
_floatLabel.font = _floatLabelFont;
[_floatLabel sizeToFit];
}

#pragma mark - UIView (Override)
Expand Down

0 comments on commit 8d18eff

Please sign in to comment.