using System;
|
using AVFoundation;
|
using CoreGraphics;
|
using Foundation;
|
using UIKit;
|
|
namespace Shared
|
{
|
public class BaseViewController : UIViewController
|
{
|
|
public static MediaPlayer.MPVolumeView MPVolumeView
|
{
|
internal set;
|
get;
|
}
|
public override void ViewDidLoad()
|
{
|
Instance = this;
|
base.ViewDidLoad();
|
var mainUIView = new UIView(new CoreGraphics.CGRect(0, 0, View.Frame.Width, View.Frame.Height));
|
View.AddSubview(mainUIView);
|
Application.RootFrameLayout = mainUIView;
|
MPVolumeView = new MediaPlayer.MPVolumeView(new CoreGraphics.CGRect(-100, -100, 0, 0)) { Hidden = false };
|
View.AddSubview(MPVolumeView);
|
}
|
public static BaseViewController Instance;
|
|
public override void DidReceiveMemoryWarning()
|
{
|
base.DidReceiveMemoryWarning();
|
// Release any cached data, images, etc that aren't in use.
|
}
|
|
}
|
}
|