Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I try added placeholderTextColor for TextInput class #996

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
!**/*.xcworkspacedata
!**/*.xcsettings
!**/*.xcscheme
Examples/UIExplorer/.idea/
React/.idea/
build/
*.pbxuser
!default.pbxuser
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/TextInputExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var TextEventsExample = React.createClass({
<TextInput
autoCapitalize="none"
placeholder="Enter text to see events"
placeholderTextColor="red"
autoCorrect={false}
onFocus={() => this.updateText('onFocus')}
onBlur={() => this.updateText('onBlur')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildAction>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
buildForRunning = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
Expand All @@ -20,60 +13,12 @@
ReferencedContainer = "container:UIExplorer.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "004D289D1AAF61C70097A701"
BuildableName = "UIExplorerTests.xctest"
BlueprintName = "UIExplorerTests"
ReferencedContainer = "container:UIExplorer.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "004D289D1AAF61C70097A701"
BuildableName = "UIExplorerTests.xctest"
BlueprintName = "UIExplorerTests"
ReferencedContainer = "container:UIExplorer.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "UIExplorer.app"
BlueprintName = "UIExplorer"
ReferencedContainer = "container:UIExplorer.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
buildConfiguration = "Debug">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
Expand All @@ -82,31 +27,5 @@
ReferencedContainer = "container:UIExplorer.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "UIExplorer.app"
BlueprintName = "UIExplorer"
ReferencedContainer = "container:UIExplorer.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion Examples/UIExplorer/UIExplorer/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
//
// To run on device, change `localhost` to the IP address of your computer, and make sure your computer and
// iOS device are on the same Wi-Fi network.
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/Examples/UIExplorer/UIExplorerApp.includeRequire.runModule.bundle?dev=true"];
jsCodeLocation = [NSURL URLWithString:@"http://bimawa.local:8081/Examples/UIExplorer/UIExplorerApp.includeRequire.runModule.bundle?dev=true"];

// OPTION 2
// Load from pre-bundled file on disk. To re-generate the static bundle, run
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/UIExplorerList.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class UIExplorerList extends React.Component {
clearButtonMode="always"
onChangeText={this._search.bind(this)}
placeholder="Search..."
placeholderTextColor="red"
style={styles.searchTextInput}
/>
</View>
Expand Down
1 change: 1 addition & 0 deletions Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ var TextInput = React.createClass({
onSubmitEditing={this.props.onSubmitEditing}
onSelectionChangeShouldSetResponder={() => true}
placeholder={this.props.placeholder}
placeholderTextColor={this.props.placeholderTextColor}
text={this.state.bufferedValue}
autoCapitalize={autoCapitalize}
autoCorrect={this.props.autoCorrect}
Expand Down
12 changes: 5 additions & 7 deletions React/Modules/RCTUIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -729,14 +729,12 @@ static BOOL RCTCallPropertySetter(NSString *key, SEL setter, id value, id view,
}

static void RCTSetViewProps(NSDictionary *props, UIView *view,
UIView *defaultView, RCTViewManager *manager)
{
[props enumerateKeysAndObjectsUsingBlock:^(NSString *key, id obj, BOOL *stop) {

SEL setter = NSSelectorFromString([NSString stringWithFormat:@"set_%@:forView:withDefaultView:", key]);
RCTCallPropertySetter(key, setter, obj, view, defaultView, manager);
UIView *defaultView, RCTViewManager *manager) {
[props enumerateKeysAndObjectsUsingBlock:^(NSString *key, id obj, BOOL *stop) {
SEL setter = NSSelectorFromString([NSString stringWithFormat:@"set_%@:forView:withDefaultView:", key]);
RCTCallPropertySetter(key, setter, obj, view, defaultView, manager);

}];
}];
}

static void RCTSetShadowViewProps(NSDictionary *props, RCTShadowView *shadowView,
Expand Down
9 changes: 5 additions & 4 deletions React/Views/RCTTextField.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

@interface RCTTextField : UITextField

@property (nonatomic, assign) BOOL caretHidden;
@property (nonatomic, assign) BOOL autoCorrect;
@property (nonatomic, assign) BOOL selectTextOnFocus;
@property (nonatomic, assign) UIEdgeInsets contentInset;
@property(nonatomic, assign) BOOL caretHidden;
@property(nonatomic, assign) BOOL autoCorrect;
@property(nonatomic, assign) BOOL selectTextOnFocus;
@property(nonatomic, assign) UIEdgeInsets contentInset;
@property(nonatomic, strong) UIColor *placeholderTextColor;

- (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher NS_DESIGNATED_INITIALIZER;

Expand Down
Loading