ios 判断系统版本,及Interger打印格式
来源:互联网 发布:淘宝如何代理虚拟 编辑:程序博客网 时间:2024/06/05 08:48
refs:
http://stackoverflow.com/questions/23818606/semantic-issue-implicit-declaration-of-function
http://stackoverflow.com/questions/4405006/nslog-printf-specifier-for-nsinteger
1)ios 判断系统版本,分别处理
Add these lines from your link to your .pch file. Clean and build. It should go away.
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
使用
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0") && SYSTEM_VERSION_LESS_THAN(@"7.1")) { xxxx; }
2)Interger NSLog打印报警,之前项目是32位,后来升级为64位导致的。
NSLog(@"%d", i);
改位 NSLog(@"%ld", i);
With current Xcode, you can make use of the z
and t
modifiers to handleNSInteger
andNSUInteger
without warnings, on all architectures.
You want to use %zd
for signed, %tu
for unsigned, and%tx
for hex.
0 0
- ios 判断系统版本,及Interger打印格式
- 判断 iOS 系统版本
- 判断ios系统版本
- ios判断系统版本
- iOS 判断系统版本
- iOS系统版本判断
- java 判断系统版本 打印版本
- IOS 判断IOS系统版本
- iOS 判断iOS系统版本
- ios sdk 判断系统版本
- ios 设备 系统 版本 判断
- JS判断IOS系统版本
- ios开发-判断设备系统版本
- 通过浏览器,javascript判断 ios 系统版本
- 黑马程序员--关于IOS系统版本判断
- iOS开发判断当前系统版本
- iOS 判断iphone ipad 系统版本
- iOS 判断iphone ipad 系统版本
- 虚拟磁盘格式转换(vdi转换vmdk)
- 黑苹果安装及相关注意事项之四,开始折腾之准备及设置篇
- jvm目录的组织结构
- Google IO:Android内存管理主题演讲记录
- 比较Fink, macports 和 homebrew
- ios 判断系统版本,及Interger打印格式
- smarty模板引擎(三)配置文件数据和保留数据
- Mac Port 基本用法总结
- KMP算法学习笔记
- OSTimeDlyHMSM()-用户不能结束延时调用
- 在UltraEdit中使用正则表达式
- jquery相关操作
- 关于数据分析的一点思考
- MySQL监控、性能调优及三范式理解