iphone - 按下按钮的简单方法 ->删除效果?或移动->重新定位视图效果?
在iPhone的Home上,你可以按住一个应用程序2秒,然后每个应用程序都在摇晃并等待被删除或重新定位。
我怎么能有这样的想法呢?
按&按住某处,每个子视图都在摇晃
按&按住某处以便用户可以重新定位视图?
就像 iO 的主屏幕或 ibook 或许多其他应用程序一样?
谢谢
On iphone's home, you can press and hold on one app for 2 secs, then everyone is shaking and waiting to be delete or relocate.
How can I have this in my own view?
press & hold on somewhere and every subview is shaking
press & hold on somewhere so user can relocate the views?
Just like iOs's home screen or ibook or quite many other apps?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
1) 您必须使用 UILongPressGestureRecognizer 来检测长按
,然后在 startWobbling 选择器中执行以下操作:
2) 请参阅 Apple 的 Touches 示例代码: http://developer.apple.com/library/ios/#samplecode/Touches/Introduction/Intro.html
1) You'd have to use UILongPressGestureRecognizer to detect long presses
and then in the startWobbling selector do:
2) Refer Touches sample code from Apple: http://developer.apple.com/library/ios/#samplecode/Touches/Introduction/Intro.html
您可以使用 Three20 库中的 TTLauncher 视图。它非常容易定制,并为您提供所需的所有摆动和重新定位:http://third20.info/展示/启动器
You can use the TTLauncher view from the Three20 lib. It is pretty easy to customize and gives you all the wobbling and relocating you are looking for: http://three20.info/showcase/launcher