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

推荐订阅源

D
Docker
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
爱范儿
爱范儿
罗磊的独立博客
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
U
Unit 42
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
H
Help Net Security
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
人人都是产品经理
人人都是产品经理

博客园 - 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;