错误:Xcode 4.6.3 - 方法dragFromToForDuration完全不起作用 [英] Error : Xcode 4.6.3 - Method dragFromToForDuration does not work at all
问题描述
我使用方法 dragFromToForDuration
在iPad上测试我的应用。此方法旨在点击并按住,然后将图像拖动到iPad屏幕上的另一个位置。我定义了图像和目标区域的确切位置。但是,实现此方法会生成错误:
I use method dragFromToForDuration
to test my app on iPad. This method intends to tap and hold then drag an image to another location on the iPad's screen. I define exactly location of both the image and the targeted area. However, implementing this method generates an error:
target.dragFromToForDuration({x:startCoord.x, y:startCoord.y}, {x:finishCoord.x, y:finishCoord.y}, {duration:3});
[_ NSCFDictionary doubleValue]:无法识别的选择器发送到实例0x1f83e5d0
[_NSCFDictionary doubleValue] : unrecognized selector sent to instance 0x1f83e5d0
更新:
如果我删除持续时间一词,代码变为:
target.dragFromToForDuration({x:startCoord.x,y:startCoord.y},{x:finishCoord.x,y:finishCoord.y},3);
Update: If I remove the word "duration" and the code became: target.dragFromToForDuration({x:startCoord.x, y:startCoord.y}, {x:finishCoord.x, y:finishCoord.y}, 3);
通过此更改,xcode不会生成任何错误/警告,并且无需在屏幕上执行任何操作即可完成此操作。
有人遇到过这个问题吗?
With this changing, xcode does not generate any error/warning and go through it without any action on the screen. Anyone encountered this problem?
推荐答案
修改目标的startPoint和endPoint后,此功能运行良好。我没有看到这个错,但是我的同伴做了。 :)
This function works well after modifying the startPoint and endPoint of target. I did not see this fault but my fellow did. :)
这篇关于错误:Xcode 4.6.3 - 方法dragFromToForDuration完全不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!