[英]dataTaskWithRequest VS sendAsynchronousRequest in iOS8/9 using Objective-c
[英]IOS8 Objective-C SignaturePoint CGRectValue
以下是具有32位体系结构Objective-C代码的“ signature.rawPoints”的输出
(
"NSRect: {{130, 142.5}, {2.3333333, 100}}",
"NSRect: {{136, 139.5}, {2.4990008, 101}}",
"NSRect: {{152.25, 131}, {2.0691545, 102}}",
"NSRect: {{169.75, 121}, {1.7328094, 103}}",
"NSRect: {{185.25, 111}, {1.5653242, 104}}",
"NSRect: {{196.125, 104}, {1.6099705, 105}}",
"NSRect: {{200.75, 101.375}, {1.9532523, 106}}"
),
但是输出是64位架构,下面是IOS8
(
"\nlocation: 87.000000,112.000000\nvelocity: 0.000000,0.000000\nacceleration: 0.000000,0.000000\ntimestamp: 19476.794956\npressure: 1.000000\ndiameter: 4.666667\nid: 100",
"\nlocation: 88.000000,116.000000\nvelocity: 22.341108,89.364433\nacceleration: 499.125115,1996.500461\ntimestamp: 19476.839717\npressure: 1.000000\ndiameter: 5.006714\nid: 101",
"\nlocation: 92.000000,125.000000\nvelocity: 228.450167,514.012876\nacceleration: 11771.412252,24252.751985\ntimestamp: 19476.857226\npressure: 1.000000\ndiameter: 4.700317\nid: 102",
"\nlocation: 97.000000,134.000000\nvelocity: 298.178096,536.720573\nacceleration: 4158.268213,1354.187550\ntimestamp: 19476.873995\npressure: 1.000000\ndiameter: 4.437694\nid: 103")
以下代码无法在上述原始点上使用64位体系结构来查找CGRectValues。
CGRect r1 = [[[signature.rawPoints objectAtIndex:i]objectAtIndex:j] CGRectValue];
错误:
2015-06-04 19:18:45.933 MySampleCloset UAT [40174:865394]-[T1SignaturePoint CGRectValue]:无法识别的选择器已发送到实例0x7f90d86b75a0 2015-06-04 19:18:45.977 MySampleCloset UAT [40174:865394] ***终止应用由于未捕获的异常'NSInvalidArgumentException',原因:'-[T1SignaturePoint CGRectValue]:无法识别的选择器发送到实例0x7f90d86b75a0'
请提出解决方案。
仔细检查您的代码。 无法识别的选择器意味着您尝试使用“错误”对象的方法,例如将NSString
视为NSArray
,并发送NSString
objectAtIndex
消息。
或者,也许您使用了某种第三库,但它们并未针对64位体系结构进行更新。
如果您想得到更好的答案,请使用CMD+K
编辑代码,然后向我们显示您的代码。
TSignaturePoint.h已添加到最新的第三点TSignature库中,因此我们必须使用以下代码来查找每个字母的签名的x和y坐标。
CGPoint p = [[[signature.rawPoints objectAtIndex:i] objectAtIndex:j]位置];
注意:[[signature.rawPoints objectAtIndex:i] objectAtIndex:j]是TSignature的类型。
我们也可以将下面的代码写成下面的代码:TSignature * sig = [[signature.rawPoints objectAtIndex:i] objectAtIndex:j]; CGPoint p =信号位置;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.