如果需要获得UIDeviceOrientation的转换消息的话,只需要:

 [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
 [[NSNotificationCenter defaultCenter] addObserver:self
                                          selector:@selector(orientationChanged:)
                                              name:UIApplicationDidChangeStatusBarFrameNotification
                                                   object:nil];

在结束时候,需要移除注册的通知(dealloc)

[[NSNotificationCenter defaultCenter] removeObserver:self];
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
- (void)orientationChanged:(NSNotification *)notification
{
    ...
}

最新文章

  1. Atitit.uke 团队建设的组织与运营之道attilax总结
  2. ubuntu-E:Encountered a section with no Package: header的解决办法 (转)
  3. Jenkins控制台中文输出乱码解决方法
  4. python IDE
  5. jQuery点击事件绑定onClick和on()
  6. java io读书笔记(4)字符数据
  7. AngularJS 1.5.0-beta.2 and 1.4.8 have been released
  8. Eclipse Error: Unable to set localhost. This prevents creation of a GUID.
  9. 多态VI的创建
  10. 搭建ntp时间服务器 ntp - (Network Time Protocol)
  11. MarkDown 编辑数学公式
  12. MyBatis学习——分步查询与延迟加载
  13. Python全栈开发-Day7-面向对象编程2
  14. Mysql 中Left/Right join on后面and和where条件查询的差异-Mysql SQL运算符是有优先级
  15. IDEA开发web程序配置Tomcat
  16. winform dataGridView DataGridViewComboBoxColumn 下拉框事件
  17. 正则表达式—RegEx(RegularExpressio)(二)
  18. Mysql修改语句的运行流程
  19. mysql-8.0.12安装和配置
  20. BroadcastReceiver学习

热门文章

  1. ul、li模仿ios的TableView实现城市选择
  2. 基于nodejs的终端天气查询
  3. iOS 监听textfield的输入(转)
  4. CSS选择器优先级排列
  5. Java学习之ConcurrentHashMap实现一个本地缓存
  6. Swift开发小技巧--自定义Log
  7. poj3233 矩阵等比数列求和 二分
  8. 安装findbugs
  9. 基于Oracle的Mybatis 批量插入
  10. oracle 知识