2019-07-01 21:12:40 +02:00
|
|
|
using Bit.iOS.Core.Utilities;
|
2019-06-27 21:48:25 +02:00
|
|
|
using System;
|
|
|
|
using UIKit;
|
|
|
|
|
|
|
|
namespace Bit.iOS.Core.Controllers
|
|
|
|
{
|
|
|
|
public class ExtendedUIViewController : UIViewController
|
|
|
|
{
|
2020-10-15 20:34:31 +02:00
|
|
|
public Action DismissModalAction { get; set; }
|
|
|
|
|
2019-06-27 21:48:25 +02:00
|
|
|
public ExtendedUIViewController(IntPtr handle)
|
|
|
|
: base(handle)
|
2019-10-01 03:17:53 +02:00
|
|
|
{
|
|
|
|
ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
|
|
|
}
|
2019-07-01 21:12:40 +02:00
|
|
|
|
|
|
|
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();
|
2020-03-28 14:16:28 +01:00
|
|
|
if (View != null)
|
2019-07-01 21:12:40 +02:00
|
|
|
{
|
|
|
|
View.BackgroundColor = ThemeHelpers.BackgroundColor;
|
|
|
|
}
|
2020-03-28 14:16:28 +01:00
|
|
|
if (NavigationController?.NavigationBar != null)
|
2019-07-01 21:12:40 +02:00
|
|
|
{
|
|
|
|
NavigationController.NavigationBar.BarTintColor = ThemeHelpers.NavBarBackgroundColor;
|
|
|
|
NavigationController.NavigationBar.BackgroundColor = ThemeHelpers.NavBarBackgroundColor;
|
|
|
|
NavigationController.NavigationBar.TintColor = ThemeHelpers.NavBarTextColor;
|
|
|
|
NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes
|
|
|
|
{
|
|
|
|
ForegroundColor = ThemeHelpers.NavBarTextColor
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2019-06-27 21:48:25 +02:00
|
|
|
}
|
|
|
|
}
|