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”,顿时觉得该好友逼格太高了 ...
随机推荐
- UITableView的常用属性和代理方法
以下是近期总结的关于tableView的一些属性和代理方法,以及一些常见的问题,现汇总如下,今后还会持续更新,请继续关注: tableView 的头部和尾部视图属性: UISwitch *foot ...
- CA 证书
1.ubuntu curl 命令报错(CA) kamil@vm-ubuntu:~$ curl https://szxyzs.vanke.com/DataCenter/datacenter/api cu ...
- Spark 学习笔记1 (常见术语 )
本来没打算学Spark 的,不过时机很逗. 最膜拜的大神做spark分享,还是其中最好玩的notebook.这不就是另外一个 HUE吗,但感觉更好玩. 刚好新的Spark 2.x 要问世了,大神在组织 ...
- python-学习笔记1-面向对象编程
1.面向对象最重要的概念就是类(Class)和实例(Instance),类是抽象的模板,而实例是根据类创建出来的一个个具体的"对象",每个对象都拥有相同的方法,但各自的数据可能不同 ...
- Leetcode 372. Super Pow
使用公式 c = ab => c mod d = [a mod d * b mod d] mod d 所以a^423 mod d = (a^100)^4 * (a ^10)^2 * a^3 ...
- Leetcode Power of two, three, four
Given an integer, write a function to determine if it is a power of two. Hint: Could you solve it in ...
- Jquery实现滚动到底部加载更多(最原始)
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8& ...
- Jenkins配置MSBuild编译.net4.6的项目
经过测试,如果用原始的msbuild,会出现语法无法识别的问题,"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe&qu ...
- Bzoj2563 阿狸和桃子的游戏
Time Limit: 3 Sec Memory Limit: 128 MBSubmit: 701 Solved: 496 Description 阿狸和桃子正在玩一个游戏,游戏是在一个带权图G= ...
- IDEA新建MAVEN项目时速度缓慢
原因 IDEA根据maven archetype的本质,其实是执行mvn archetype:generate命令,该命令执行时,需要指定一个archetype-catalog.xml文件. 该命令的 ...