面试题:常见的Objective-C的数据类型有哪些,和C的基本数据类型有什么区别?

常见的Objective-C的数据类型:NSInteger、CGFloat、BOOL、NSString、NSArray、NSDictionary、NSNumber、NSValue等。

int和NSInteger,float和CGFloat

NSInteger和CGFloat可以根据操作系统位数判断使用int、float(32位),还是long、double(64位),OC中建议使用NSInteger和CGFloat。

你可能感兴趣的:(面试题:常见的Objective-C的数据类型有哪些,和C的基本数据类型有什么区别?)