CGRect rect = [UIScreen mainScreen].bounds; ? ? _friendsCircleTitleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,140, 44)]; ? ? _friendsCircleTitleView.backgroundColor = [UIColor clearCo...
分类:
移动开发 时间:
2015-06-14 21:30:38
阅读次数:
449
UIView/UIWindow/UIScreen/CALayer1、UIScreen可以获取设备屏幕的大小。1234567// 整个屏幕的大小 {{0, 0}, {320, 480}}CGRect bounds = [UIScreen mainScreen].bounds;NSLog(@"UIScr...
分类:
移动开发 时间:
2015-06-09 23:17:41
阅读次数:
280
objective-c基础总结第一二章1.application:didiFinishLauchingWithOptions:程序启动后立即执行2.启动界面代码格式:self.window = [UIWindow alloc] initWithFrame:[[UIScreen mainScreen]...
分类:
移动开发 时间:
2015-06-09 16:35:14
阅读次数:
204
pch 可以用来存储共享信息,比如设备屏幕的宽度,高度。版本号等等 公用信息
Xcode 老版本会自动为我们创建pch文件,新版本开始不自动创建了,如果需要使用可以自己手动创建
创建完成后可以在里面定义常量
此处以屏幕尺寸为例
如下
代码如下:
//获取屏幕
宽度、高度
#define SCREEN_FRAME ([UIScreen mainS...
分类:
移动开发 时间:
2015-06-06 10:37:09
阅读次数:
165
//获取屏幕的宽度
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
//判断时iPhone几
#define kDoubleMargin 0.00001
#def...
分类:
其他好文 时间:
2015-06-05 15:50:19
阅读次数:
121
在.pch文件里导入即可//界面宽高#define BatteryHeight 20.0#define NavBarHeight 44.0#define TabBarHeight 49.0#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size....
分类:
移动开发 时间:
2015-05-26 14:10:51
阅读次数:
220
//系统window创建出来(并且给window一个全屏的大小) self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization .....
分类:
其他好文 时间:
2015-05-21 21:50:49
阅读次数:
107
//系统window创建出来(并且给window一个全屏的大小) self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization .....
分类:
其他好文 时间:
2015-05-21 19:20:58
阅读次数:
106
——[UIScreen mainScreen].bound 得到主屏幕的rect——MAX(A,B) 系统自带的宏定义,用来得出A,B两数中的最大值——清除颜色 [UIColor clearColor] ——RGB里德数值都要除以255,都是0~1内的数值 巧妙运用头文件,从而实现#define ....
分类:
其他好文 时间:
2015-05-17 23:29:02
阅读次数:
157
最近公司又要用之前项目了,但是市场部反应是在系统8.3上,我们的app 通过appleTV 映射到屏幕,显示不全,方向不对。我们app的要求是 在iPad上显示的主界面一样,但是其他编辑界面是不会让看appleTV映射的人看到。也就是说我们进行了多屏处理。
后来发现iOS8的UIScreen多加了属性:
fixedCoordinateSpace
然后参考方法:
[myView
c...
分类:
移动开发 时间:
2015-05-16 21:51:13
阅读次数:
169