如何在swift中使用线程?
dispatchOnMainThread:^{
NSLog(@"Block Executed On %s", dispatch_queue_get_label(dispatch_get_current_queue()));
}];
Run Code Online (Sandbox Code Playgroud) 我怎么能每分钟运行一个功能?在JavaScript中我可以做类似的事情setInterval,在Swift中存在类似的东西吗?
通缉输出:
你好世界每分钟一次......