wxr
2020-06-09 77e7b5223dd04a6e036dc952efb38f2b770a6828
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
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.
        }
 
    }
}