QQ空间HD(4)-设置左侧菜单栏属性
DJHomeViewController.m
#import "DJHomeViewController.h"
#import "DJMenuView.h" const CGFloat screenW = ;
const CGFloat screenH = ; @interface DJHomeViewController () @property (nonatomic,weak) DJMenuView *menuView; @end @implementation DJHomeViewController - (void)viewDidLoad {
[super viewDidLoad]; DJMenuView *menuView = [[DJMenuView alloc] init]; [self.view addSubview:menuView];
self.menuView = menuView; // 根据屏幕方向设置menu属性
[self willRotateToInterfaceOrientation:self.interfaceOrientation duration:]; } - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
} /** 当屏幕方向将会发生改变时调用此方法 */
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) {
NSLog(@"当前已旋转为横屏");
self.menuView.width = ;
self.menuView.height = screenW; } else {
NSLog(@"当前已旋转为竖屏");
self.menuView.width = ;
self.menuView.height = screenH;
} } @end
横屏:

竖屏:

QQ空间HD(4)-设置左侧菜单栏属性的更多相关文章
- QQ空间HD(5)-添加左侧菜单栏内容
DJIconView.m #import "DJIconView.h" @implementation DJIconView - (instancetype)initWithFra ...
- WebStorm设置左侧菜单栏背景和字体设置
WebStorm左侧菜单栏 webstorm是一款前端IDE利器,个人感觉黑色的背景比较炫酷,刚开始从网上下载的主题只能修改编辑窗口的背景色,经过查询资料终于把左边菜单栏的背景色也修改了. 第一步:点 ...
- ClientKey实现登录QQ空间,并设置背景音乐
ClientKey大家都知道的,通过webbrowser登录后取得Cookie并计算出GTK,即可操作空间的POST. 源代码中引用了苏飞的Http类库,自己修改添加了一些拓展方法. 下载地址:htt ...
- WebStorm设置左侧菜单栏背景色和样式
WebStrom一直以来都是默认的白色主题,今天想修改了下主题皮肤,结果导致左侧项目资源栏和顶部菜单栏也变成了黑色,结果无法改变回来,网上查了各种帖子,居然也没找到解决方法,自己研究了半天,终于搞定了 ...
- QQ空间HD(6)-实现自定义的选项卡切换效果
DJTabbarButton.m #import "DJTabbarButton.h" @implementation DJTabbarButton - (instancetype ...
- QQ空间HD(1)-UIPopoverController基本使用
UIPopoverController 是iPad的专属API ViewController.m #import "ViewController.h" #import " ...
- QQ空间HD(3)-Modal的切换效果总结
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { UIViewController ...
- QQ空间HD(2)-UIPopoverController其它使用
DJTestViewController.m #import "DJTestViewController.h" #import "DJColorTableViewCont ...
- 长姿势 教你在qq空间上显示iPhone6尾巴
下午刚午休完的时候,广州很多童鞋都感受到了震感,半青也感受到了,不仅如此,我还感受到了更大震感,那就是翻一下QQ空间动态,竟然看到有一位好友的尾巴竟然显示为“iPhone6”,顿时觉得该好友逼格太高了 ...
随机推荐
- 纯JSP实现简单登录跳转
1.JSP介绍 JSP即Java Server Pages,JSP技术使用Java编程语言编写类XML的tags和scriptlets,来封装产生动态网页的处理逻辑.网页还能通过tags和script ...
- SPOJ GSS4 Can you answer these queries IV
Time Limit: 500MS Memory Limit: 1572864KB 64bit IO Format: %lld & %llu Description You are g ...
- dedecms /plus/feedback_ajax.php、/templets/feedback_main.htm、/templets/feedback_edit.htm XSS && SQL Injection Vul
catalog . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 通过该漏洞可以注入恶意代码到评论标题里,网站管理员在后台管理用户评论时触 ...
- shell 调试手段总结
对于厌烦了的 print 和 echo,可以尝试点新鲜省力的小手段. 1. 使用 shell 的执行选项 sh 和 bash 常用的执行指令有:-n.-x.-c.-v. 其中: -n 是 noexec ...
- POJ 1804 Brainman(归并排序)
传送门 Description Background Raymond Babbitt drives his brother Charlie mad. Recently Raymond counted ...
- UVa 11149 Power of Matrix(倍增法、矩阵快速幂)
题目链接: 传送门 Power of Matrix Time Limit: 3000MS Description 给一个n阶方阵,求A1+A2+A3+......Ak. 思路 A1+A2+. ...
- Spring--PropertyPlaceholderConfigurer
1. PropertyPlaceholderConfigurer是个bean工厂后置处理器的实现,也就是 BeanFactoryPostProcessor接口的一个实现.PropertyPlaceho ...
- soapUI使用-DataSource获取oracle库中的参数
soapUI使用-DataSource获取oracle库中的参数 下载mysql和oracle驱动包:http://pan.baidu.com/s/1i3sy1MH 放在Program Files\S ...
- 如何使用alt键+数字键盘上的数字键打出特殊符号
如何使用alt键+数字键盘上的数字键打出特殊符号 有时当我需要画示意图说明一个问题,但是苦于没有合适的符号,因此,这篇博文将简单介绍一些特殊的符号方便自己以及大家使用. 实现原理很简单:所有的字符(包 ...
- webView(简单的浏览器)
#import "MJViewController.h" @interface MJViewController () <UISearchBarDelegate, UIWeb ...