Skip to content

Commit

Permalink
[css] UITextField support including a simple NITextField that allows …
Browse files Browse the repository at this point in the history
…placeholder color and font override
  • Loading branch information
Max Metral committed Feb 22, 2013
1 parent ee14917 commit 5549c3f
Show file tree
Hide file tree
Showing 12 changed files with 421 additions and 17 deletions.
42 changes: 42 additions & 0 deletions examples/css/CSSDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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>"; };
Expand Down Expand Up @@ -291,6 +312,8 @@
66832D41144214DA003E413C /* Core */ = {
isa = PBXGroup;
children = (
C7A8793916D7C99800A0C23F /* NITextField.h */,
C7A8793A16D7C99800A0C23F /* NITextField.m */,
C7B9284916D2F736001BF61C /* NIInvocationMethods.h */,
C7B9284A16D2F736001BF61C /* NIInvocationMethods.m */,
66832DAE14434FB2003E413C /* NICommonMetrics.h */,
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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;
};
Expand Down
7 changes: 5 additions & 2 deletions examples/css/CSSDemo/RootViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#import "UIView+NIStyleable.h"
#import "NIUserInterfaceString.h"
#import "NIInvocationMethods.h"
#import "NITextField.h"

#import "AppDelegate.h"

Expand Down Expand Up @@ -66,8 +67,10 @@ - (void)loadView {
],
[[UILabel alloc] init], @".rightMiddleLabel", NILocalizedStringWithDefault(@"RightLabel", @"Right Middle Label"),
[[UILabel alloc] init], @".bottomLabel", NILocalizedStringWithDefault(@"BottomLabel", @"Bottom Left Label"),
_button = [UIButton buttonWithType:UIButtonTypeCustom], NI_INVOKE(buttonPress), NILocalizedStringWithDefault(@"TestButton", @"Test Button"), @"#TestButton"
] inDOM:_dom];
_button = [UIButton buttonWithType:UIButtonTypeCustom], NI_INVOKE(buttonPress), NILocalizedStringWithDefault(@"TestButton", @"Test Button"), @"#TestButton",
[[NITextField alloc] init], @".textField"
]
inDOM:_dom];

for (int i = 1; i <= 7; i++) {
UIView *box = [[UIView alloc] init];
Expand Down
12 changes: 12 additions & 0 deletions examples/css/CSSDemo/resources/css/root/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ UIButton:highlighted
color: green;
}

.textField {
height: 50px;
width: 200px;
bottom: 30px;
right: 30px;
}

.textField:empty {
-mobile-text-key: "This is blue";
color: blue;
}

#box1 {
background-color: white;
bottom: 180px;
Expand Down
34 changes: 32 additions & 2 deletions src/Nimbus.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,12 @@
66FE7D6D13FB83620061B987 /* NITableViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FE7D6613FB83620061B987 /* NITableViewModel.m */; };
C743F6EA16D2652F00A933B7 /* NIUserInterfaceString.h in Headers */ = {isa = PBXBuildFile; fileRef = C743F6E816D2652F00A933B7 /* NIUserInterfaceString.h */; };
C743F6EB16D2652F00A933B7 /* NIUserInterfaceString.m in Sources */ = {isa = PBXBuildFile; fileRef = C743F6E916D2652F00A933B7 /* NIUserInterfaceString.m */; };
C743F6EC16D2652F00A933B7 /* NIUserInterfaceString.m in Sources */ = {isa = PBXBuildFile; fileRef = C743F6E916D2652F00A933B7 /* NIUserInterfaceString.m */; };
C7A8791516D733F700A0C23F /* NITextField.h in Headers */ = {isa = PBXBuildFile; fileRef = C7A8791316D733F700A0C23F /* NITextField.h */; };
C7A8791616D733F700A0C23F /* NITextField.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8791416D733F700A0C23F /* NITextField.m */; };
C7A8791D16D7348700A0C23F /* NITextField+NIStyleable.h in Headers */ = {isa = PBXBuildFile; fileRef = C7A8791B16D7348700A0C23F /* NITextField+NIStyleable.h */; };
C7A8791F16D7348C00A0C23F /* NITextField+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8791C16D7348700A0C23F /* NITextField+NIStyleable.m */; };
C7A8792216D7B96200A0C23F /* UITextField+NIStyleable.h in Headers */ = {isa = PBXBuildFile; fileRef = C7A8792016D7B96200A0C23F /* UITextField+NIStyleable.h */; };
C7A8792316D7B96200A0C23F /* UITextField+NIStyleable.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A8792116D7B96200A0C23F /* UITextField+NIStyleable.m */; };
C7B9284316D2F563001BF61C /* NIInvocationMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = C7B9284116D2F563001BF61C /* NIInvocationMethods.h */; };
C7B9284416D2F563001BF61C /* NIInvocationMethods.m in Sources */ = {isa = PBXBuildFile; fileRef = C7B9284216D2F563001BF61C /* NIInvocationMethods.m */; };
C7B9284516D2F563001BF61C /* NIInvocationMethods.m in Sources */ = {isa = PBXBuildFile; fileRef = C7B9284216D2F563001BF61C /* NIInvocationMethods.m */; };
Expand Down Expand Up @@ -975,6 +980,12 @@
66FE7D6813FB83620061B987 /* NimbusModelsTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "NimbusModelsTests-Info.plist"; sourceTree = "<group>"; };
C743F6E816D2652F00A933B7 /* NIUserInterfaceString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NIUserInterfaceString.h; path = css/src/NIUserInterfaceString.h; sourceTree = SOURCE_ROOT; };
C743F6E916D2652F00A933B7 /* NIUserInterfaceString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIUserInterfaceString.m; path = css/src/NIUserInterfaceString.m; sourceTree = SOURCE_ROOT; };
C7A8791316D733F700A0C23F /* NITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NITextField.h; sourceTree = "<group>"; };
C7A8791416D733F700A0C23F /* NITextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NITextField.m; sourceTree = "<group>"; };
C7A8791B16D7348700A0C23F /* NITextField+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NITextField+NIStyleable.h"; path = "css/src/NITextField+NIStyleable.h"; sourceTree = SOURCE_ROOT; };
C7A8791C16D7348700A0C23F /* NITextField+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NITextField+NIStyleable.m"; path = "css/src/NITextField+NIStyleable.m"; sourceTree = SOURCE_ROOT; };
C7A8792016D7B96200A0C23F /* UITextField+NIStyleable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UITextField+NIStyleable.h"; path = "css/src/UITextField+NIStyleable.h"; sourceTree = SOURCE_ROOT; };
C7A8792116D7B96200A0C23F /* UITextField+NIStyleable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UITextField+NIStyleable.m"; path = "css/src/UITextField+NIStyleable.m"; sourceTree = SOURCE_ROOT; };
C7B9284116D2F563001BF61C /* NIInvocationMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIInvocationMethods.h; sourceTree = "<group>"; };
C7B9284216D2F563001BF61C /* NIInvocationMethods.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NIInvocationMethods.m; sourceTree = "<group>"; };
DB3A230913FD4B8E00614220 /* libNimbusAttributedLabel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libNimbusAttributedLabel.a; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -1517,6 +1528,7 @@
668ECDC61455C17100455266 /* NIStylesheetCache.m */,
C743F6E816D2652F00A933B7 /* NIUserInterfaceString.h */,
C743F6E916D2652F00A933B7 /* NIUserInterfaceString.m */,
C7A8791A16D7344F00A0C23F /* Styleable Nimbus Views */,
668ECDD014565AB800455266 /* Chameleon */,
66832D0C143E3C1C003E413C /* Styleable UIKit Views */,
66832D0B143E3C0E003E413C /* Tokenizer */,
Expand Down Expand Up @@ -1594,6 +1606,8 @@
443589C21551909E00757E50 /* UIToolbar+NIStyleable.m */,
66832D1114416368003E413C /* UIView+NIStyleable.h */,
66832D1214416368003E413C /* UIView+NIStyleable.m */,
C7A8792016D7B96200A0C23F /* UITextField+NIStyleable.h */,
C7A8792116D7B96200A0C23F /* UITextField+NIStyleable.m */,
);
name = "Styleable UIKit Views";
sourceTree = "<group>";
Expand Down Expand Up @@ -1764,6 +1778,8 @@
66A03C6313E6E8D100B514F3 /* NSString+NimbusCore.m */,
C7B9284116D2F563001BF61C /* NIInvocationMethods.h */,
C7B9284216D2F563001BF61C /* NIInvocationMethods.m */,
C7A8791316D733F700A0C23F /* NITextField.h */,
C7A8791416D733F700A0C23F /* NITextField.m */,
);
name = src;
path = core/src;
Expand Down Expand Up @@ -2034,6 +2050,15 @@
path = models/unittests;
sourceTree = SOURCE_ROOT;
};
C7A8791A16D7344F00A0C23F /* Styleable Nimbus Views */ = {
isa = PBXGroup;
children = (
C7A8791B16D7348700A0C23F /* NITextField+NIStyleable.h */,
C7A8791C16D7348700A0C23F /* NITextField+NIStyleable.m */,
);
name = "Styleable Nimbus Views";
sourceTree = "<group>";
};
DB3A230B13FD4B8E00614220 /* NimbusAttributedLabel */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -2213,6 +2238,8 @@
66C1D83D16B9CE90003E855B /* NIImageUtilities.h in Headers */,
66C1D8C116B9ED65003E855B /* NIButtonUtilities.h in Headers */,
C7B9284316D2F563001BF61C /* NIInvocationMethods.h in Headers */,
C7A8791516D733F700A0C23F /* NITextField.h in Headers */,
C7A8791D16D7348700A0C23F /* NITextField+NIStyleable.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -2287,6 +2314,7 @@
66D2FE071594083800B2BEFD /* AFXMLRequestOperation.h in Headers */,
66D2FE091594083800B2BEFD /* UIImageView+AFNetworking.h in Headers */,
C743F6EA16D2652F00A933B7 /* NIUserInterfaceString.h in Headers */,
C7A8792216D7B96200A0C23F /* UITextField+NIStyleable.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -3486,6 +3514,7 @@
66C1D83E16B9CE90003E855B /* NIImageUtilities.m in Sources */,
66C1D8C216B9ED65003E855B /* NIButtonUtilities.m in Sources */,
C7B9284416D2F563001BF61C /* NIInvocationMethods.m in Sources */,
C7A8791616D733F700A0C23F /* NITextField.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -3595,6 +3624,8 @@
66D2FE081594083800B2BEFD /* AFXMLRequestOperation.m in Sources */,
66D2FE0A1594083800B2BEFD /* UIImageView+AFNetworking.m in Sources */,
C743F6EB16D2652F00A933B7 /* NIUserInterfaceString.m in Sources */,
C7A8791F16D7348C00A0C23F /* NITextField+NIStyleable.m in Sources */,
C7A8792316D7B96200A0C23F /* UITextField+NIStyleable.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -3604,7 +3635,6 @@
files = (
66832CC1143D7883003E413C /* NICSSParserTests.m in Sources */,
66832CF9143E1C0C003E413C /* NIStylesheetTests.m in Sources */,
C743F6EC16D2652F00A933B7 /* NIUserInterfaceString.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
38 changes: 38 additions & 0 deletions src/core/src/NITextField.h
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
Loading

0 comments on commit 5549c3f

Please sign in to comment.