标签:
转自:http://my.oschina.net/u/1025290/blog/300037
#ifndef UI_DEFINITIONS #define UI_DEFINITIONS #pragma mark UI相关常量 //导航栏高度 #define CONTENT_NAVIGATIONBAR_HEIGHT 44 //底部tabbar 高度 #define CONTENT_TABBAR_HEIGHT 49 //英文状态下键盘的高度 #define ENGISH_KEYBOARD_HEIGHT 216 //屏幕宽度 #define SCREEN_WIDTH ([[UIScreen mainScreen]bounds].size.width) //屏幕高度 #define SCREEN_HEIGHT ([[UIScreen mainScreen]bounds].size.height) //搜索框frame #define SEARCH_BAR_FRAME CGRectMake(0,0,SCREEN_WIDTH, 44) //iPhone statusbar 高度 #define PHONE_STATUSBAR_HEIGHT 20 //iPhone 屏幕尺寸,已去掉status bar的高度 #define PHONE_SCREEN_SIZE (CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT - PHONE_STATUSBAR_HEIGHT)) //判断是否为4寸屏iPhone #define IS_IPHONE_568 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568) //适配3.5寸屏和4寸品的图片名 #define ADAPT_IMAGE_NAME(imageName) (IS_IPHONE_568 ? [NSString stringWithFormat:@"%@-568h", [imageName stringByDeletingPathExtension]]:imageName) //加粗字体 #define BOLDLABELFONT(fontSize) [UIFont boldSystemFontOfSize:fontSize] //普通字体 #define LABELFONT(fontSize) [UIFont systemFontOfSize:fontSize] //将图片加入bundle文件 #define GET_IMAGE_FROM_BUNDLE_PATH(imageName,bundleName) [ResBundleUtils imageNamedFromImagesBundlePNG:imageName withSubPath:bundleName] #endif
标签:
原文地址:http://www.cnblogs.com/xiguain/p/4642677.html