问题描述:

i am capturing image in ios swift and try to save image and thumbnail image in background task

using this code

 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), {

var imageSaveCall = self.storeReceiptImageToFile(imageToSave,fileName:fileName)

dispatch_async(dispatch_get_main_queue(), {

println("Raw image saved")

})

})

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), {

var imageSaveCall = self.storeReceiptThumbImageToFile(imageToSave,fileName:fileName)

dispatch_async(dispatch_get_main_queue(), {

println("thumb image saved")

})

})

it is working fine up to 4 time, after that it not even hitting the store image function. is there any mistake i am doing?

相关阅读:
Top