惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
V
V2EX
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
A
About on SuperTechFans
博客园_首页
L
LangChain Blog
量子位
雷峰网
雷峰网
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Jina AI
Jina AI
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium

博客园 - Think

[开源]jquery.ellipsis根据宽度(不是字数)进行内容截断,支持多行内容 jquery代码链实现延时执行代码【补:几点注意】 根据用户选的背景色,自动匹配一个前景色 jquery代码链实现延时执行代码的较优雅办法 C++11智能指针处理Array对象 低端用户反文化----这个问题真这么简单? 放暑假了 jQuery 1.7.2 animate功能跨浏览器Bug修补 AsyncEnumerator对EAP的支持 大数据块(BLOBs)与流(Stream)操作性能规范 SQL Antipatterns内容介绍 Chromium Embedded Framework中文文档 (使用C API) Chromium Embedded Framework中文文档 (如何链接不同的运行时) Chromium Embedded Framework中文文档 (SVN属性) Chromium Embedded Framework中文文档 (升级到最新的Chrome) Chromium Embedded Framework中文文档之(基本使用) Chromium Embedded Framework 中文文档(简介) 操盘之王 摘要 市场营销经典《引爆点》简摘
强制iphone界面马上旋转
Think · 2011-05-03 · via 博客园 - Think

在现在的ios sdk中,我们一般通过UIApplication的setStatusBarOrientation:来进行View的强制旋转(当然,还要配合- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation),但是,setStatusBarOrientation并不一定马上会执行shouldAutorotateToInterfaceOrientation进行界面旋转,这时,有个小技巧可以让界面马上旋转过来,那就是调用一下 UINavigationController的presentModalViewController:animated:

.........{
    
//为了马上旋转过来
    UINavigationController* nav = [[GurgleAppDelegate getAppDelegate] navigationController];
    UIViewController 
*controller = [[UIViewController alloc] init];
    UINavigationController 
*parentController = [[UINavigationController alloc] initWithRootViewController:controller];
    [nav presentModalViewController:parentController animated:NO];
    [controller dismissModalViewControllerAnimated:NO];
    [parentController release];
    [controller release];

}

// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    
// Return YES for supported orientations.
    return viewOrientation == interfaceOrientation;