韌館-LearnHouse

Archive for 1 月, 2017

[iOS]Objective-C常用的Cocoa Touch API

dispatch_async

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
    // 耗时的操作
    dispatch_async(dispatch_get_main_queue(), ^{
        // 更新界面
    });
}); 

Read more...

2017年1 月 posted by admin in 程式&軟體 and have No Comments