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.
我需要在后台线程中运行一个长时间运行的循环,并在主线程上更新一次 UI。我怎么能用 Cocoa 脚本做到这一点?
我正在尝试创建一个 Sketch 插件。
谢谢你。
下面的代码应该做到这一点:无论当前的运动员在哪里,当你点击下一个按钮时,下面的代码就会被执行。它应该将当前运动员更改为数组中的下一个运动员,然后当它到达最后一个人时,它需要循环回 0(第一个对象)。它确实做到了这一点。当我到达数组的末尾时,它会再次转到第一个人,这是正确的,但从那时起将跳过数组中的最后