Air for iOS:在我的 Mac 上测试滑动手势
我现在正在开发一个带有air 的iOS 项目。一切都很好,我在其他一些手势中实现了“滑动”手势。一开始,手势被识别,事件被触发,一切都很好。
然后我改变了一些东西(不要问我什么),并且事件不再被调度。
所以我的问题是,如果我想测试它,我必须编译,然后上传到 testflightapp.com,然后安装它。需要很多时间。
开发时是否有可能在我的 mac 上测试手势?这样我就可以跟踪并检查发生了什么或没有发生什么。
我使用 Flash IDE CS5.5 进行编译,但如果有解决方案,也可以使用 Flash Builder。
为了您的兴趣,这里是我的代码中有趣的部分。
Multitouch.inputMode = MultitouchInputMode.GESTURE;
contestView.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipeContest);
function onSwipeContest (e:TransformGestureEvent):void{
if (e.offsetX == 1) {
//User swiped towards right
// do something
}
}
I'm working right now on an iOS project with air. Everything is fine, and I implemented the "swipe" gesture among some others. In the beginning, the gesture was recognized, the event fired, everything alright.
Then I changed something (don't ask me what), and the event isn't any more dispatched.
So my Problem is, if I want to test it, I'll have to compile, then upload to testflightapp.com, then install it. Takes a lot of time.
Is there any possibility to test the gesture on my mac while developing? So I can trace and check what is happening, or what not.
I compile with the Flash IDE CS5.5, but could also with Flash Builder if there is a solution.
And just for your interest, here the interesting part of my code.
Multitouch.inputMode = MultitouchInputMode.GESTURE;
contestView.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipeContest);
function onSwipeContest (e:TransformGestureEvent):void{
if (e.offsetX == 1) {
//User swiped towards right
// do something
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个蹩脚的答案,但你为什么不跳过测试飞行步骤并将其直接转储到你的手机上呢?你安装了xcode吗?如果是这样,请启动它,打开管理器,设置您的设备进行开发,然后开始使用。那样,那样更快。
反正。
您确定手势事件在您的 Mac 上不起作用吗?我发现多点触控事件不稳定,但从 Air 2 开始,手势事件通常可以在触控板上正常工作。
This is a lame answer, but why aren't you skipping the testflight step and just dumping it straight to your phone? do you have xcode installed? if so, fire it up, open the organizer, set your device for development, and have at it. way, way faster that way.
anyway.
are you sure that gesture events aren't functioning on your mac? i've found that multitouch events are spotty, but gesture ones usually work ok on the trackpad from air 2 onward.