我肯定做了一些非常明显错误的事情,但我看不到它。
double 是 C 类型,而不是 Objective-C 对象。因此你使用 C 类型转换:
double myDouble = 3.2; int myInt = (int)myDouble;