Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个按钮,只要按下它,我就想执行一个动作。当它放开时,动作应该停止。例如,我的按钮是在按钮按下时显示一张图片,直到松开为止。这样的事情是怎么做的?
您可以在操作上开始操作并在操作上touchDownInside停止touchUpInside操作 - 您可以将它们连接到 IB 中。
touchDownInside
touchUpInside