首页 > 移动平台 > 详细

IOS 方向开发

时间:2014-11-06 02:07:44      阅读:173      评论:0      收藏:0      [点我收藏+]

 UIDeviceOrientation orientation;

    orientation = [[UIDevice currentDevice] orientation];

    

    switch (orientation) {

        case UIDeviceOrientationFaceUp:

            self.orientationLabel.text=@"Face Up";

            break;

        case UIDeviceOrientationFaceDown:

            self.orientationLabel.text=@"Face Down";

            break;

        case UIDeviceOrientationPortrait:

            self.orientationLabel.text=@"Standing Up";

            break;

        case UIDeviceOrientationPortraitUpsideDown:

            self.orientationLabel.text=@"Upside Down";

            break;

        case UIDeviceOrientationLandscapeLeft:

            self.orientationLabel.text=@"Left Side";

            break;

        case UIDeviceOrientationLandscapeRight:

            self.orientationLabel.text=@"Right Side";

            break;

        default:

            self.orientationLabel.text=@"Unknown";

            break;

    }


本文出自 “深圳市联城通科技公司” 博客,谢绝转载!

IOS 方向开发

原文:http://roderickkennedy.blog.51cto.com/6758427/1572747

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