Explore tweets tagged as #dispatchqueue
Swift Challenge #03.Level: 🟢🟢⚪️. Have a look at this ViewController:. In the fetchData method, we use a closure inside DispatchQueue.main.async. Is it necessary to capture self here? Why or why not?
7
4
59
@alpennec @ChristianSelig Feels weird, but just add DispatchQueue.main.async, so it renders on the next cycle
4
3
73
No more stacking DispatchQueue's or Task.sleeps to chain simple animations in SwiftUI. 🙏. #WWDC23
0
0
14
你们会使用 Task 来包装这种异步任务吗?这种方式虽然在语法上满足了“异步需求”,但并没有充分利用系统的并发优势,反而会占用资源,拖慢其他任务的调度。正确做法是使用 DispatchQueue 来创建一个 background 来执行文件 I/O 操作。. #SwiftUI
3
0
1