小编mar*_*oss的帖子

Xcode Scheme中的Debug可执行选项

除了允许调试应用程序的明显功能(大多数情况下使用调试配置),为什么要启用此选项,例如,即使在发布配置中也是如此

这个功能有什么用?

debugging xcode ios xcode6

13
推荐指数
1
解决办法
6556
查看次数

32/64位设备上的Objective-C划分产生不同的结果

如标题中所述,当我尝试执行以下divsion时,我会得到两个不同的结果,具体取决于设备的体系结构:

unsigned int a = 42033;
unsigned int b = 360;
unsigned int c = 466
double result = a / (double)(b * c);
// on arm64 -> result = 0.25055436337625181
// on armv7 -> result = 0.24986030696800732
Run Code Online (Sandbox Code Playgroud)

为什么结果不匹配?

根据针对Cocoa Touch的 Apple 64位过渡指南,这些数据类型在32位和64位运行时具有相同的大小.

编辑

完整的代码:

#import "UIImage+MyCategory.h"

#define CLIP_THRESHOLD 0.74 // if this much of the image is the clip color, leave it alone

typedef struct {
    unsigned int leftNonColorIndex;
    unsigned int rightNonColorIndex;
    unsigned int nonColorCount;
} scanLineResult; …
Run Code Online (Sandbox Code Playgroud)

c math arm objective-c ios

5
推荐指数
1
解决办法
440
查看次数

标签 统计

ios ×2

arm ×1

c ×1

debugging ×1

math ×1

objective-c ×1

xcode ×1

xcode6 ×1