强制让程序改成横屏
来源:互联网 发布:网络喷子喷国家喷党 编辑:程序博客网 时间:2024/06/06 05:37
- (void)viewDidLoad{ [super viewDidLoad]; if ([[UIDevice currentDevice].systemVersion floatValue] < 2.1) { UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; if (orientation == UIInterfaceOrientationLandscapeRight) { CGAffineTransform transform = self.view.transform; // use the status bar frame to determine the center point of the window's content area. CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; CGRect bounds = CGRectMake(0, 0, statusBarFrame.size.height, statusBarFrame.origin.x); CGPoint center = CGPointMake(bounds.size.height / 2.0, bounds.size.width / 2.0); // set the center point of the view to the center point of the window's content area. self.view.center = center; // Rotate the view 90 degrees around its new center point. transform = CGAffineTransformRotate(transform, (M_PI / 2.0)); self.view.transform = transform; } }}
https://developer.apple.com/library/prerelease/ios/#technotes/tn2244/_index.html#//apple_ref/doc/uid/DTS40009012
- 强制让程序改成横屏
- 强制让Linux一个程序coredump
- 关于iPad程序如何强制横屏
- Android 程序中设置强制横屏
- 移动端如何让页面强制横屏
- 移动端如何让页面强制横屏
- 移动端如何让页面强制横屏
- 手机上如何让页面强制横屏
- 移动端如何让页面强制横屏
- Android 强制横屏
- ios强制横屏
- 强制横屏
- 强制横屏
- android 强制横屏
- iOS 强制横屏
- 强制横屏
- iOS强制横屏
- 强制横屏
- 在 Linux 下安装 Nginx
- 白话经典算法系列之一 冒泡排序的三种实现
- LayerBuffer与视频的SoftwareRender流程
- Nginx 简介
- php 面试题
- 强制让程序改成横屏
- android下实现framebuffer独占的原理
- ReportViewer 无法加载客户端打印控件
- C++ 封装的多线程类
- iPad加载webView内容
- redhat5 raw 的管理
- hibernate 主键指定不当造成的错误
- 浅析http协议
- 经典:从追MM谈Java的23种设计模式