拖动以创建一条线
标题不太具有描述性,但我会尽力在这里解释一下。我正在开发一个应用程序的打开屏幕,您可以在其中单击标题并将手指拖动到您想要玩的游戏模式。现在,这两个对象都是按钮,但我希望能够通过在两个对象之间拖动或在它们之间单击来在按钮之间创建一条线。然后我希望显示一条线,表明两者之间存在联系。连接建立后,它选择该按钮(游戏模式)
谢谢
The title is not very descriptive, but I will do my best to explain it here. I am working on an opening screen on an app where you click the title and drag your finger to the game mode you want to play. Right now, both things are buttons, but I want to be able to create a line in-between the buttons by either dragging between the two objects, or clicking in-between them. I then want a line to show up indicating that there was a connection between the two. And after the connection is made, it selects that button (the game mode)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 Quartz 来完成此操作。从按钮的中心或边缘到首先渲染的指尖创建一条线,以便它跟随您的手指,然后附加到下一个按钮,一旦有效,添加更多几何图形以获得更好的视觉效果。
You could do it with Quartz. Create a line from center or edge of button to the fingertip rendered first, so it follows your finger, then attach to next button, once that works add more geometry for better visuals.