forked from jverkoey/nimbus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css] UITextField support including a simple NITextField that allows …
…placeholder color and font override
- Loading branch information
Max Metral
committed
Feb 22, 2013
1 parent
ee14917
commit 5549c3f
Showing
12 changed files
with
421 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,13 @@ | |
C743F6E616D1F4EB00A933B7 /* btn_blue_inactive.png in Resources */ = {isa = PBXBuildFile; fileRef = C743F6E216D1F4EB00A933B7 /* btn_blue_inactive.png */; }; | ||
C743F6E716D1F4EB00A933B7 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = C743F6E316D1F4EB00A933B7 /* [email protected] */; }; | ||
C743F6F416D29F2500A933B7 /* NIUserInterfaceString.m in Sources */ = {isa = PBXBuildFile; fileRef = C743F6F316D29F2500A933B7 /* NIUserInterfaceString.m */; }; | ||
C7A8793316D7C8EC00A0C23F /* NITextField+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8792816D7C8E900A0C23F /* NITextField+NIStyleable.m */; }; | ||
C7A8793416D7C8EC00A0C23F /* UIScrollView+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8792A16D7C8EA00A0C23F /* UIScrollView+NIStyleable.m */; }; | ||
C7A8793516D7C8EC00A0C23F /* UISearchBar+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8792C16D7C8EB00A0C23F /* UISearchBar+NIStyleable.m */; }; | ||
C7A8793616D7C8EC00A0C23F /* UITableView+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8792E16D7C8EB00A0C23F /* UITableView+NIStyleable.m */; }; | ||
C7A8793716D7C8EC00A0C23F /* UITextField+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8793016D7C8EC00A0C23F /* UITextField+NIStyleable.m */; }; | ||
C7A8793816D7C8EC00A0C23F /* UIToolbar+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8793216D7C8EC00A0C23F /* UIToolbar+NIStyleable.m */; }; | ||
C7A8793B16D7C99800A0C23F /* NITextField.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8793A16D7C99800A0C23F /* NITextField.m */; }; | ||
C7B9283F16D2B45A001BF61C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C7B9283D16D2B45A001BF61C /* Localizable.strings */; }; | ||
C7B9284B16D2F736001BF61C /* NIInvocationMethods.m in Sources */ = {isa = PBXBuildFile; fileRef = C7B9284A16D2F736001BF61C /* NIInvocationMethods.m */; }; | ||
/* End PBXBuildFile section */ | ||
|
@@ -180,6 +187,20 @@ | |
C743F6E316D1F4EB00A933B7 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "[email protected]"; path = "resources/[email protected]"; sourceTree = "<group>"; }; | ||
C743F6F316D29F2500A933B7 /* NIUserInterfaceString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIUserInterfaceString.m; path = ../../src/css/src/NIUserInterfaceString.m; sourceTree = "<group>"; }; | ||
C743F6F516D2AAC200A933B7 /* NIUserInterfaceString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIUserInterfaceString.h; path = ../../src/css/src/NIUserInterfaceString.h; sourceTree = "<group>"; }; | ||
C7A8792716D7C8E900A0C23F /* NITextField+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NITextField+NIStyleable.h"; path = "../../src/css/src/NITextField+NIStyleable.h"; sourceTree = "<group>"; }; | ||
C7A8792816D7C8E900A0C23F /* NITextField+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NITextField+NIStyleable.m"; path = "../../src/css/src/NITextField+NIStyleable.m"; sourceTree = "<group>"; }; | ||
C7A8792916D7C8EA00A0C23F /* UIScrollView+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+NIStyleable.h"; path = "../../src/css/src/UIScrollView+NIStyleable.h"; sourceTree = "<group>"; }; | ||
C7A8792A16D7C8EA00A0C23F /* UIScrollView+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+NIStyleable.m"; path = "../../src/css/src/UIScrollView+NIStyleable.m"; sourceTree = "<group>"; }; | ||
C7A8792B16D7C8EA00A0C23F /* UISearchBar+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UISearchBar+NIStyleable.h"; path = "../../src/css/src/UISearchBar+NIStyleable.h"; sourceTree = "<group>"; }; | ||
C7A8792C16D7C8EB00A0C23F /* UISearchBar+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UISearchBar+NIStyleable.m"; path = "../../src/css/src/UISearchBar+NIStyleable.m"; sourceTree = "<group>"; }; | ||
C7A8792D16D7C8EB00A0C23F /* UITableView+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UITableView+NIStyleable.h"; path = "../../src/css/src/UITableView+NIStyleable.h"; sourceTree = "<group>"; }; | ||
C7A8792E16D7C8EB00A0C23F /* UITableView+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UITableView+NIStyleable.m"; path = "../../src/css/src/UITableView+NIStyleable.m"; sourceTree = "<group>"; }; | ||
C7A8792F16D7C8EB00A0C23F /* UITextField+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UITextField+NIStyleable.h"; path = "../../src/css/src/UITextField+NIStyleable.h"; sourceTree = "<group>"; }; | ||
C7A8793016D7C8EC00A0C23F /* UITextField+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UITextField+NIStyleable.m"; path = "../../src/css/src/UITextField+NIStyleable.m"; sourceTree = "<group>"; }; | ||
C7A8793116D7C8EC00A0C23F /* UIToolbar+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIToolbar+NIStyleable.h"; path = "../../src/css/src/UIToolbar+NIStyleable.h"; sourceTree = "<group>"; }; | ||
C7A8793216D7C8EC00A0C23F /* UIToolbar+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIToolbar+NIStyleable.m"; path = "../../src/css/src/UIToolbar+NIStyleable.m"; sourceTree = "<group>"; }; | ||
C7A8793916D7C99800A0C23F /* NITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NITextField.h; path = ../../src/core/src/NITextField.h; sourceTree = "<group>"; }; | ||
C7A8793A16D7C99800A0C23F /* NITextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NITextField.m; path = ../../src/core/src/NITextField.m; sourceTree = "<group>"; }; | ||
C7B9283E16D2B45A001BF61C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = resources/en.lproj/Localizable.strings; sourceTree = "<group>"; }; | ||
C7B9284916D2F736001BF61C /* NIInvocationMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIInvocationMethods.h; path = ../../src/core/src/NIInvocationMethods.h; sourceTree = "<group>"; }; | ||
C7B9284A16D2F736001BF61C /* NIInvocationMethods.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIInvocationMethods.m; path = ../../src/core/src/NIInvocationMethods.m; sourceTree = "<group>"; }; | ||
|
@@ -291,6 +312,8 @@ | |
66832D41144214DA003E413C /* Core */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
C7A8793916D7C99800A0C23F /* NITextField.h */, | ||
C7A8793A16D7C99800A0C23F /* NITextField.m */, | ||
C7B9284916D2F736001BF61C /* NIInvocationMethods.h */, | ||
C7B9284A16D2F736001BF61C /* NIInvocationMethods.m */, | ||
66832DAE14434FB2003E413C /* NICommonMetrics.h */, | ||
|
@@ -337,6 +360,18 @@ | |
66832D7C144214EF003E413C /* CSS */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
C7A8792716D7C8E900A0C23F /* NITextField+NIStyleable.h */, | ||
C7A8792816D7C8E900A0C23F /* NITextField+NIStyleable.m */, | ||
C7A8792916D7C8EA00A0C23F /* UIScrollView+NIStyleable.h */, | ||
C7A8792A16D7C8EA00A0C23F /* UIScrollView+NIStyleable.m */, | ||
C7A8792B16D7C8EA00A0C23F /* UISearchBar+NIStyleable.h */, | ||
C7A8792C16D7C8EB00A0C23F /* UISearchBar+NIStyleable.m */, | ||
C7A8792D16D7C8EB00A0C23F /* UITableView+NIStyleable.h */, | ||
C7A8792E16D7C8EB00A0C23F /* UITableView+NIStyleable.m */, | ||
C7A8792F16D7C8EB00A0C23F /* UITextField+NIStyleable.h */, | ||
C7A8793016D7C8EC00A0C23F /* UITextField+NIStyleable.m */, | ||
C7A8793116D7C8EC00A0C23F /* UIToolbar+NIStyleable.h */, | ||
C7A8793216D7C8EC00A0C23F /* UIToolbar+NIStyleable.m */, | ||
66832DE714434FBE003E413C /* NimbusCSS.h */, | ||
66832DE814434FBE003E413C /* NIStyleable.h */, | ||
66832DED14434FBE003E413C /* NICSSRuleSet.h */, | ||
|
@@ -525,6 +560,13 @@ | |
66D2FE2A15941EEB00B2BEFD /* UIImageView+AFNetworking.m in Sources */, | ||
C743F6F416D29F2500A933B7 /* NIUserInterfaceString.m in Sources */, | ||
C7B9284B16D2F736001BF61C /* NIInvocationMethods.m in Sources */, | ||
C7A8793316D7C8EC00A0C23F /* NITextField+NIStyleable.m in Sources */, | ||
C7A8793416D7C8EC00A0C23F /* UIScrollView+NIStyleable.m in Sources */, | ||
C7A8793516D7C8EC00A0C23F /* UISearchBar+NIStyleable.m in Sources */, | ||
C7A8793616D7C8EC00A0C23F /* UITableView+NIStyleable.m in Sources */, | ||
C7A8793716D7C8EC00A0C23F /* UITextField+NIStyleable.m in Sources */, | ||
C7A8793816D7C8EC00A0C23F /* UIToolbar+NIStyleable.m in Sources */, | ||
C7A8793B16D7C99800A0C23F /* NITextField.m in Sources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// Copyright 2011 Max Metral | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
/** | ||
* UITextField leaves a little to be desired on the visual customization front. | ||
* NITextField attempts to solve the most basic of those gaps so that | ||
* the CSS subsystem can function properly. | ||
*/ | ||
@interface NITextField : UITextField | ||
|
||
/** | ||
* If non-nil, this color will be used to draw the placeholder text. | ||
* If nil, we will use the system default. | ||
*/ | ||
@property (nonatomic,strong) UIColor *placeholderTextColor; | ||
|
||
/** | ||
* If non-nil, this font will be used to draw the placeholder text. | ||
* else the text field font will be used. | ||
*/ | ||
@property (nonatomic,strong) UIFont *placeholderFont; | ||
|
||
@end |
Oops, something went wrong.