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

推荐订阅源

雷峰网
雷峰网
MongoDB | Blog
MongoDB | Blog
D
Docker
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
U
Unit 42

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