经测试,发现:[UIScreen mainScreen].bounds;返回的CGRect,包含状态栏20的高度。[UIScreen mainScreen].applicationFrame;返回的CGRect,不包含状态栏20的高度。在此记录下,方便以后查阅。不要笑我菜鸟!
分类:
移动开发 时间:
2015-04-14 19:35:41
阅读次数:
161
获取屏幕高 let?screenHeight = UIScreen.mainScreen().bounds.size.height 获取屏幕宽 let?screenWidth = UIScreen.mainScreen().bounds.size.width...
分类:
其他好文 时间:
2015-04-13 16:56:31
阅读次数:
103
-(IBAction)doImage:(id)sender{ CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width; NSArray *mArray = @[@"1.jpeg",@"2.jpeg",@"3.jpeg",@"4......
分类:
其他好文 时间:
2015-04-12 14:39:15
阅读次数:
132
一、UIWindow1.UIWindow和UIView的关系(1)UIWindow是UIView的一个子类,提供视图的显示区域;(2)UIWindow继承自UIView,包含应用程序的可视区域。2.UIWindow的创建 //1.获取屏幕尺寸 UIScreen *screen=[UISc...
分类:
其他好文 时间:
2015-04-09 23:44:04
阅读次数:
146
UIApplication、UIView、UIWindow、UIScreen、UIViewController、UINavigationController 介绍...
分类:
移动开发 时间:
2015-04-09 10:39:24
阅读次数:
194
//// RootViewController.m// 头部滚动展示视图// 头部滚动广告视图#define SCREEN_SIZE [UIScreen mainScreen].bounds.size#define KImageCnt 5#define KImage_H 250#import "Ro...
分类:
移动开发 时间:
2015-04-01 21:41:24
阅读次数:
164
获取状态栏的尺寸
CGRect rect;
rect=[[UIApplication sharedApplication]statusBarFrame];
获取屏幕尺寸
CGRect rect;
rect=[[UIScreen mainScreen]bounds];
CGSize size=rect.size;
CGFloat width=size.w...
分类:
其他好文 时间:
2015-03-30 09:29:48
阅读次数:
101
一个动画效果by 伍雪颖#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)@interfaceViewController ()@end@implementation ViewController- (void)viewDid...
分类:
其他好文 时间:
2015-03-13 10:31:28
阅读次数:
113
一直对ios设备的尺寸不大敏感,搞不清[[UIScreen mainScreen] bounds] 和[UIScreen mainScreen] applicationFrame]的区别,故总是心虚,现扫盲下:定义一个宏:?1#definePrintRect(frame)NSLog(@"X:%f,Y...
分类:
移动开发 时间:
2015-03-09 16:01:27
阅读次数:
150
//app尺寸,去掉状态栏 CGRect appRect = [UIScreen mainScreen].applicationFrame; NSLog(@"%f, %f, %f,%f",appRect.origin.x, appRect.origin.y, appRect.size.wi...
分类:
移动开发 时间:
2015-03-07 23:58:01
阅读次数:
338