UIWindow

1. UIWindow

2. UIWindow的使用场景

2.1 额外添加的Window需要手动进行旋转

最近有遇到一个UIWindow的使用场景:在ApplicationDelegate.window之外额外创建了一个UIWindow对象(下文称为:otherWin)。

otherWin的windowLevel属性设置为UIWindowLevelAlert。关于windowLevel参考 Ref[2]

现象是:ApplicationDelegate.window可以依据current device orientation进行适当的旋转,而otherWin则不进行旋转。

解决方法如Ref[1]所示。

在iOS 8中针对UIWindow作的改变,参见 Ref[8]。


Reference

1. iPhone - UIWindow rotating depending on current orientation?

2. Using multiple UIWindows in iOS applications

http://shaune.com.au/using-multiple-uiwindows-in-ios-applications/

3. Understanding Windows and Screens

https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/WindowAndScreenGuide/WindowScreenRolesinApp/WindowScreenRolesinApp.html

4. UIWindow in iOS (ToRead) (AAAA+)

www.fantageek.com/1317/uiwindow-in-ios/

5. iOS UIScreen and UIWindow

http://isometrick.blogspot.tw/2013/09/ios-uiscreen-and-uiwindow.html

6. UIWindow orientation issues (two UIWindows and landscape mode)

http://fileraid.us/uiwindow-orientation-issues-two-uiwindows-and-landscape-mode/

7. Technical Note TN2244 Launching your iPhone Application in Landscape

8. Custom UIWindows do not rotate correctly in iOS 8

iOS.UI.UIWindow的更多相关文章

  1. [IOS]IOS UI指南

    [IOS]IOS UI指南 众所周知,IOS的界面设计,越来越流行,可以说都形成了一个标准,搜集了一些资料,供自己以后学习使用! iOS Human Interface Guidelines (中文翻 ...

  2. IOS UI 第八篇:基本UI

    实现图片的滚动,并且自动停止在每张图片上     - (void)viewDidLoad{    [super viewDidLoad]; UIScrollView *scrollView = [[U ...

  3. 国外IOS UI指南

    国外IOS UI指南 众所周知,IOS的界面设计,越来越流行,可以说都形成了一个标准,搜集了一些资料,供自己以后学习使用! iOS Human Interface Guidelines (中文翻译) ...

  4. iOS UI的几种模式

    iOS UI的几种模式: 1.平凡模式(原生控件组合): 2.新闻模式: 3.播放器模式: 4.微博模式:

  5. 通过实现一个TableView来理解iOS UI编程

    推荐一篇神作: 通过实现一个TableView来理解iOS UI编程 http://blog.jobbole.com/61101/

  6. iOS 关于UIWindow 的认识

    UIWindow是一种特殊的UIView,通常在一个app中只会有一个UIWindow iOS程序启动完毕后,创建的第一个视图控件就是UIWindow,接着创建控制器的view,最后将控制器的view ...

  7. [iOS UI进阶 - 0] Quiartz2D

    A.简介 1. 需要掌握的 drawRect:方法的使用 常见图形的绘制:线条.多边形.圆 绘图状态的设置:文字颜色.线宽等 图形上下文状态的保存与恢复 图形上下文栈 1.基本图形绘制* 线段(线宽. ...

  8. IOS UI 第二篇:基本UI

    1.UI书写:   一个小练习图片如下:     代码如下:     @implementation AppDelegate{    UIControl *control;    UILabel *l ...

  9. [iOS UI设计笔记整理汇总]

    8.UIsearchbar放到Navigationbar 上(意思是建个View作为titleview) //此处调用的是第三方封装的SearchBar,也可以自定义. self.searchBarW ...

随机推荐

  1. 推荐几个Adobe Flex Builder 3的插件(代码格式化和fms服务器通讯文件(main.asc)编写)

    1.Fms plugins 编写FMS服务器端脚本时,最头疼的莫过于AS1的语法了.习惯了AS2.3后,在没有代码提示的环境下,写代码确实是件很头疼的事,这个插件就可以发挥作用了. Flash Med ...

  2. python闭包的代码

  3. 微信小程序----搜索框input回车搜索事件

    在微信小程序里的搜索框,按软键盘回车键触发搜索事件. <input type="text"  placeholder="搜索" value="{ ...

  4. jenkins commande not found

    解决方法: http://www.geekcome.com/content-10-3868-1.html 1.控制台执行 echo $PATH 把输出的这句话复制 2.jenkins->系统管理 ...

  5. 数组的es6新方法

    1.数组去重 var  changeReArr=(arr)=>{ return Array.from(new Set([1,2,2,3,5,4,5]))//利用set将[1,2,2,3,5,4, ...

  6. array_column 低版本兼容

    function i_array_column($input, $columnKey, $indexKey=null){ if(!function_exists('array_column')){ $ ...

  7. CSS 美化radio checkbox

    CSS 样式 <style type="text/css"> .option-input { -webkit-appearance: none; -moz-appear ...

  8. mysql 连表查询

    现有tablea:                                                                              tableb:       ...

  9. pyinstaller linux系统下打包python源文件

    将python程序放在其他linux服务器中执行,通常linux服务器中默认安装python2.6,很多情况下需要升级为2.7  且要安装程序中需要的第三方模块,配置较为麻烦,所以通过在本地linux ...

  10. html中相对(relative),绝对(absolute)位置以及float的学习和使用案例 (转)

    这几天着手于CSS的研究,研究的原因主要是工作需要,最近发现如果做前端仅仅会javascript很难尽善尽美,当然懂样式和html在一定程度上可以让我们更近一步. css较为简单,由于个人擅长编写代码 ...