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. Kubernetes+Prometheus+Grafana部署笔记

    一.基础概念 1.1 基础概念 Kubernetes(通常写成“k8s”)Kubernetes是Google开源的容器集群管理系统.其设计目标是在主机集群之间提供一个能够自动化部署.可拓展.应用容器可 ...

  2. tensflow分布式

    https://blog.csdn.net/CodeMaster_/article/details/76223835 代码解析好文: https://wenku.baidu.com/view/94b2 ...

  3. (转载)jenkins 安装 SVN Publisher 后向 svn 提交代码报错: E170001: Authentication required for...

    问题描写叙述 安装并启动 jenkins 后,加入了 SVN Publisher 插件,然后在构建任务的“构建后操作”操作中加入了“Publish to Subversion repository”相 ...

  4. java 方法引用(method reference)

    it -> it != null等价于Objects::nonNull

  5. django admin后台设置

    #encoding:utf-8 from django.contrib import admin from son10.models import * # Register your models h ...

  6. shell 通过shift获得某位后的入参

    有时shell的入参个数不定,想要获得第2位后的参数,作为新的入参调用其他脚本   通常这时候想到的方法是用遍历,例如下面的方法: for (( i=2;i<=$#;i++)) do       ...

  7. SQLdeveloper换成windows主题后不显示的情况

    这几天因为换电脑需要重新安装数据库, 因为换成了64位系统, 原先的oracle数据库也换成了64位, 但是plsql还是要用32位的, 经过深思熟虑也没装, 请教了一个同学改用oracle自带的sq ...

  8. Nginx的配置文件nginx.conf配置详解

    user nginx nginx; #Nginx用户及组:用户 组.window下不指定 worker_processes 8; #工作进程:数目.根据硬件调整,通常等于CPU数量或者2倍于CPU. ...

  9. RxJS之转化操作符 ( Angular环境 )

    一 map操作符 类似于大家所熟知的 Array.prototype.map 方法,此操作符将投射函数应用于每个值 并且在输出 Observable 中发出投射后的结果. import { Compo ...

  10. word 2016 加载 mathtype

    1.加载wold: 首先打开word,选择选项-------加载项------管理(A),选择word加载项,点击转到 这儿显示的是我已经添加过的所以显示的有. 2.点击添加,找到你的mathtype ...