我有一個應用程序,與舊的swift代碼開發。現在我將它更新爲最新的swift語法。雖然更新我發現在調度隊列困難,在這裏它給兩個警告全球(優先級)在IOS 8已被廢棄和背景在IOS 8優先和背景已被棄用在ios 8
DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.background).async(execute: { [weak self] in //Getting warning in this line
if let strongSelf = self {
strongSelf.populateOutBoundContacts()
strongSelf.lookForContactsToPresent()
}
})
https://stackoverflow.com/a/37806522/5362750看起來這個 –