mirror of
https://github.com/bitwarden/mobile.git
synced 2024-09-27 03:52:57 +02:00
b163a0fe77
* fix for stuck extension sheets when dismissed by swipe * simplify dismiss action assignments
49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
using Bit.iOS.Core.Utilities;
|
|
using System;
|
|
using UIKit;
|
|
|
|
namespace Bit.iOS.Core.Controllers
|
|
{
|
|
public class ExtendedUITableViewController : UITableViewController
|
|
{
|
|
public Action DismissModalAction { get; set; }
|
|
|
|
public ExtendedUITableViewController(IntPtr handle)
|
|
: base(handle)
|
|
{
|
|
ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
|
}
|
|
|
|
public override void ViewWillAppear(bool animated)
|
|
{
|
|
UINavigationBar.Appearance.ShadowImage = new UIImage();
|
|
UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
|
|
base.ViewWillAppear(animated);
|
|
}
|
|
|
|
public override void ViewDidLoad()
|
|
{
|
|
base.ViewDidLoad();
|
|
if (View != null)
|
|
{
|
|
View.BackgroundColor = ThemeHelpers.BackgroundColor;
|
|
}
|
|
if (TableView != null)
|
|
{
|
|
TableView.BackgroundColor = ThemeHelpers.BackgroundColor;
|
|
TableView.SeparatorColor = ThemeHelpers.SeparatorColor;
|
|
}
|
|
if (NavigationController?.NavigationBar != null)
|
|
{
|
|
NavigationController.NavigationBar.BarTintColor = ThemeHelpers.NavBarBackgroundColor;
|
|
NavigationController.NavigationBar.BackgroundColor = ThemeHelpers.NavBarBackgroundColor;
|
|
NavigationController.NavigationBar.TintColor = ThemeHelpers.NavBarTextColor;
|
|
NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes
|
|
{
|
|
ForegroundColor = ThemeHelpers.NavBarTextColor
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|