在屏幕上移动按钮 [英] Move a button in the screen

查看:64
本文介绍了在屏幕上移动按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 UIButton ,我想通过在屏幕上触摸和滑动来移动该按钮。当我释放触摸时,它将处于当前位置。

I have an UIButton and I want to move that button by touching and swiping it in the screen. When I release the touch it will be in the current position. Explain clearly, please.

推荐答案

检查

您应该从这些点开始移动框并相应地移动框,以便您的按钮可以移动到触摸的地方

you should make move frame from the points and move frame accordingly so that your button moves in places of touches

这篇关于在屏幕上移动按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆