diff --git a/src/iOS.Core/Handlers/CustomNavigationHandler.cs b/src/iOS.Core/Handlers/CustomNavigationHandler.cs index cc2919480..5b4769eba 100644 --- a/src/iOS.Core/Handlers/CustomNavigationHandler.cs +++ b/src/iOS.Core/Handlers/CustomNavigationHandler.cs @@ -5,7 +5,7 @@ using UIKit; namespace Bit.iOS.Core.Handlers { - //This is a Compatibility verion of the NavigationRenderer. Eventually we should see if there's a better way to implement this behavior. + //This is a Compatibility version of the NavigationRenderer. Eventually we should see if there's a better way to implement this behavior. public class CustomNavigationHandler : Microsoft.Maui.Controls.Handlers.Compatibility.NavigationRenderer { public override void PushViewController(UIViewController viewController, bool animated) diff --git a/src/iOS.Core/Handlers/CustomViewCellHandler.cs b/src/iOS.Core/Handlers/CustomViewCellHandler.cs new file mode 100644 index 000000000..184f6063e --- /dev/null +++ b/src/iOS.Core/Handlers/CustomViewCellHandler.cs @@ -0,0 +1,26 @@ +using Bit.App.Utilities; +using UIKit; + +namespace Bit.iOS.Core.Handlers +{ + //This is a Compatibility version of the ViewCellRenderer. Eventually we should see if there's a better way to implement this behavior. + public class CustomViewCellHandler : Microsoft.Maui.Controls.Handlers.Compatibility.ViewCellRenderer + { + private bool _noSelectionStyle = false; + + public CustomViewCellHandler() + { + _noSelectionStyle = !(ThemeManager.GetResourceColor("BackgroundColor").Equals(Colors.White)); + } + + public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv) + { + var cell = base.GetCell(item, reusableCell, tv); + if (_noSelectionStyle) + { + cell.SelectionStyle = UITableViewCellSelectionStyle.None; + } + return cell; + } + } +} diff --git a/src/iOS.Core/Utilities/iOSCoreHelpers.cs b/src/iOS.Core/Utilities/iOSCoreHelpers.cs index dcce807c0..3350d1332 100644 --- a/src/iOS.Core/Utilities/iOSCoreHelpers.cs +++ b/src/iOS.Core/Utilities/iOSCoreHelpers.cs @@ -47,6 +47,7 @@ namespace Bit.iOS.Core.Utilities { handlers.AddHandler(typeof(TabsPage), typeof(Handlers.CustomTabbedHandler)); handlers.AddHandler(typeof(NavigationPage), typeof(Handlers.CustomNavigationHandler)); + handlers.AddHandler(typeof(ViewCell), typeof(Handlers.CustomViewCellHandler)); handlers.AddHandler(typeof(ContentPage), typeof(Handlers.CustomContentPageHandler)); Handlers.ButtonHandlerMappings.Setup(); Handlers.DatePickerHandlerMappings.Setup();