Error : Xcode 4.6.3 - Method dragFromToForDuration does not work at all

浪尽此生 提交于 2020-01-05 04:02:08

问题


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] : unrecognized selector sent to instance 0x1f83e5d0

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);

With this changing, xcode does not generate any error/warning and go through it without any action on the screen. Anyone encountered this problem?


回答1:


This function works well after modifying the startPoint and endPoint of target. I did not see this fault but my fellow did. :)



来源:https://stackoverflow.com/questions/19803701/error-xcode-4-6-3-method-dragfromtoforduration-does-not-work-at-all

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!