-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaseDialogViewController.cs
58 lines (43 loc) · 1.46 KB
/
BaseDialogViewController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using MonoTouch.UIKit;
using MonoTouch.Dialog;
namespace Xaminar
{
// Base class to do a load of setup and configuration for each dialogviewcontroller we use.
public class BaseDialogViewController : DialogViewController
{
public BaseDialogViewController() : base(null, false)
{
}
public BaseDialogViewController(bool pushing) : base(null, pushing)
{
}
public BaseDialogViewController(RootElement root) : base(root)
{
}
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
ParentViewController.View.BackgroundColor = UIColor.FromPatternImage(Resources.Background);
View.BackgroundColor = UIColor.Clear;
if (Util.UseTintColor)
{
if (NavigationController != null)
{
NavigationController.NavigationBar.TintColor = Resources.NavBarTintColor;
}
}
//the first and last ones are to keep the pushed stack with the correct info on it,
// and the tab bar
if (NavigationItem != null)
{
NavigationItem.Title = Title;
NavigationItem.TitleView = new UIImageView(Resources.NavBarLogo);
}
if (TabBarItem != null)
{
TabBarItem.Title = Title;
}
}
}
}