预编译文件信息以及iPhone的尺寸

1.预编译文件信息


#ifndef myDefintion_pch

#define myDefintion_pch


#define Margin  5

#define Padding 10

#define iOS8TopMargin 64 //导航栏44,状态栏20

//判断当前的iOS系统是否是8.0及以上系统

#define IOS8_OR_LATER   ( [[[UIDevice currentDevice] systemVersion] compare:@"8.0"] != NSOrderedAscending )

//判断当前正在运行的设备是IPhone还是IPad,若是1则为IPhone

#define isIphone    [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone

//自定义颜色

#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]


#define ButtonHeight 44

//导航栏高度

#define NavigationBarHeight 44

//当前手机屏幕的宽高

#define ScreenWidth   [UIScreen mainScreen].bounds.size.width

#define ScreenHeight  [UIScreen mainScreen].bounds.size.height

#ifdef DEBUG

//打印当前信息的所在的文件名(即当前的viewController),当前所在的函数名,当前所在的行号,当前要打印的信息

# define DLog(fmt, ...) NSLog((@"[文件名:%s]\n" "[函数名:%s]\n" "[行号:%d] \n" fmt), __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__);

#else

# define DLog(...);

#endif



#ifdef __IPHONE_6_0

# define IFLY_ALIGN_CENTER NSTextAlignmentCenter

#else

# define IFLY_ALIGN_CENTER UITextAlignmentCenter

#endif


#ifdef __IPHONE_6_0

# define IFLY_ALIGN_LEFT NSTextAlignmentLeft

#else

# define IFLY_ALIGN_LEFT UITextAlignmentLeft

#endif



#endif /* myDefintion_pch */


2.iphone的尺寸分辨率

//iPhone宽高

//iPhone 4S          3.5    320x480

//iPhone 5//c/s    4     320x568

//iPhone 6(/s/)      4.7    375x667

//iPhone 6(/p/sp/)   5.5    414x736

//iPhone 7           4.7    375x667

//iPhone 7p          5.5    414x736



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值