64位编程:整数/小数
A 对应64位编程的时候,
对于整数应使用NSInteger和NSUInteger,而非int
对于小数应使用CGFloat,而非float
NSInteger其实是一个自动定义,在32位中为int,而64位中为long。CGFloat的原理类似
IPhone, Cocoa, PHP, Javascript, JQuery, Actionscript, etc…
Posts tagged ‘NSInteger’
A 对应64位编程的时候,
对于整数应使用NSInteger和NSUInteger,而非int
对于小数应使用CGFloat,而非float
NSInteger其实是一个自动定义,在32位中为int,而64位中为long。CGFloat的原理类似