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

fix(iOS)(9_0_X): use searchtextfield exposed in iOS 13 to set color #11566

Merged
merged 3 commits into from Apr 8, 2020

Conversation

vijaysingh-axway
Copy link
Contributor

@build build added this to the 9.0.1 milestone Mar 25, 2020
@build build requested a review from a team March 25, 2020 17:46
@build
Copy link
Contributor

build commented Mar 25, 2020

Messages
📖

💾 Here's the generated SDK zipfile.

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖

✅ All tests are passing
Nice one! All 6521 tests are passing.
(There are 703 skipped tests not included in that total)

Generated by 🚫 dangerJS against 4aafa41

@vijaysingh-axway vijaysingh-axway changed the title fix(ios): use searchtextfield exposed in iOS 13 to set color fix(iOS)(9_0_X): use searchtextfield exposed in iOS 13 to set color Mar 25, 2020
[self setHintTextColor_:[[self proxy] valueForUndefinedKey:@"hintTextColor"]];
if ([TiUtils isIOSVersionOrGreater:@"13.0"]) {
// Need to call a bit later to get searchTextField loaded
[self performSelector:@selector(setHintTextColor_:) withObject:[[self proxy] valueForUndefinedKey:@"hintTextColor"] afterDelay:.01];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have more info why this is required? I'd love to know why this only works after adding the delay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In debugging I found that SearchTextField inside searchbar takes sometime to load and before loading the searchTextField setting this property is not working.

@ssjsamir ssjsamir self-requested a review April 8, 2020 11:38
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed using the following test case, able to set colour to search field and hint.

var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
 
var searchBar = Ti.UI.createSearchBar({
color: 'red',
barColor: 'gray',
showCancel: 'true',
hintTextColor: 'red',
hintText: 'Enter Value',
height: 43,
top: 100
});
 
win.add(searchBar);
win.open();
 

Environment

MacOS Catalina: 10.15.5 Beta 
Xcode: 11.4
Java Version: 1.8.0_131
Android NDK: 21.1.6273396-beta2
Node.js: 10.16.3
""NPM":"5.0.0-1","CLI":"8.0.0-master.10""
iphone 8 Sim (13.4)

@ssjsamir ssjsamir merged commit f881591 into tidev:9_0_X Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants