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
Conversation
|
[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]; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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)
https://jira.appcelerator.org/browse/TIMOB-27754