コード例 #1
0
        /// <summary>
        /// Called every time the Panel is about to be shown
        /// </summary>
        /// <param name="animated">If set to <c>true</c> animated.</param>
        public override void ViewWillAppear(bool animated)
        {
            CGRect frame = UIScreen.MainScreen.Bounds;

            if (InterfaceOrientation != UIInterfaceOrientation.Portrait)
            {
                frame.Width  = UIScreen.MainScreen.Bounds.Height;
                frame.Height = UIScreen.MainScreen.ApplicationFrame.Width;
                frame.X      = UIScreen.MainScreen.ApplicationFrame.Y;

                if (UIApplication.SharedApplication.StatusBarOrientation == UIInterfaceOrientation.LandscapeLeft)
                {
                    frame.Y = UIScreen.MainScreen.ApplicationFrame.X;
                }
                else
                {
                    frame.Y = UIScreen.MainScreen.Bounds.Width - UIScreen.MainScreen.ApplicationFrame.Width;
                }
            }

            View.Frame = frame;
            PanelVC.ViewWillAppear(animated);
            base.ViewWillAppear(animated);
        }
コード例 #2
0
 /// <summary>
 /// Called every time after the Panel is hidden
 /// </summary>
 /// <param name="animated">If set to <c>true</c> animated.</param>
 public override void ViewDidDisappear(bool animated)
 {
     PanelVC.ViewDidDisappear(animated);
     base.ViewDidDisappear(animated);
 }