首页 > 移动平台 > 详细

Xamarin.ios 重新定位视图

时间:2017-01-04 10:28:36      阅读:221      评论:0      收藏:0      [点我收藏+]
//旋转手机重新定位视图
/// <summary> 
        /// 重新定位视图
        /// </summary>
        /// <param name="toInterfaceOrientation">To interface orientation.</param>
        /// <param name="duration">Duration.</param>
        public override void WillRotate(UIInterfaceOrientation toInterfaceOrientation, double duration)
        {
            UIInterfaceOrientation destOrientation = toInterfaceOrientation;
            //判断选择方向
            if (destOrientation == UIInterfaceOrientation.LandscapeLeft | destOrientation == UIInterfaceOrientation.LandscapeRight)
            {
                vv.Frame = new RectangleF(0, 0, 667, 375);
            }
            else { 
            
                vv.Frame = new RectangleF(0, 0,  375,667);
            }
        } 

 

Xamarin.ios 重新定位视图

原文:http://www.cnblogs.com/IKang8701348/p/6247467.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!