-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppearanceManager.cs
38 lines (30 loc) · 1.32 KB
/
AppearanceManager.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
using System;
using MonoTouch.UIKit;
namespace Xaminar
{
public static class AppearanceManager
{
public static void SetAppearance()
{
if (Util.UseUIAppearance)
{
UINavigationBar.Appearance.SetBackgroundImage(
Resources.NavBarHeaderBackground,
UIBarMetrics.Default);
UIBarButtonItem.Appearance.SetBackgroundImage(
Resources.BarButtonNormal.CreateResizableImage(new UIEdgeInsets(0,5,0,5)),
UIControlState.Normal,
UIBarMetrics.Default);
UIBarButtonItem.Appearance.SetBackButtonBackgroundImage(
Resources.BarButtonBackNormal.CreateResizableImage(new UIEdgeInsets(0,15,0,5)),
UIControlState.Normal,
UIBarMetrics.Default);
UITabBar.Appearance.BackgroundImage = Resources.TabBarBackground;
//it'd be nice to be able to do this, but it appears to be one of the bits apple missed
// so we do it in BaseDialogViewController
//UITableView.Appearance.BackgroundColor = UIColor.Clear;
//UIView.Appearance.BackgroundColor = UIColor.FromPatternImage(Resources.Background);
}
}
}
}