maui
maui copied to clipboard
[iOS] Setting background color on the Searchbar - fix
Issues Fixed
Fixes https://github.com/dotnet/maui/issues/23325 Fixes https://github.com/dotnet/maui/issues/24100
Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
@kubaflo @PureWeen I think I see another bug. Once a custom BackgroundColor has been set its not possible to return to the default color (searchHandler.BackgroundColor = null;). Infact it will cause a NRE in line 168 (backGroundColor.ToPlatform()).
Proposed change to line 154
if (backGroundColor == null)
{
_hasCustomBackground = false;
backgroundView.Layer.CornerRadius = 0;
backgroundView.ClipsToBounds = false;
backgroundView.BackgroundColor = _defaultBackgroundColor;
textField.BackgroundColor = _defaultBackgroundColor;
return;
}
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase