Skip to content

Instantly share code, notes, and snippets.

Muhammad Bassio muhammadbassio

Block or report user

Report or block muhammadbassio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
muhammadbassio / code.swift
Last active Oct 13, 2016
increment number using async calls in for loop
View code.swift
// get number of files before starting.
var getNumberFull = DealWithFileSystem.fetchNumberOfFilesInFolder(folderName: "Folder2")
for asset in self.arrayOfSelectAssets {
if let getNumberFromThumb = DealWithFileSystem.fetchNumberOfFilesInFolder(folderName: "Folder1") {
let filePathThumb = DealWithFileSystem.fetchFolderName(folderName: "Folder1")?.appendingPathComponent("Image \(getNumberFromThumb).png")
let fetchOption = PHImageRequestOptions()
fetchOption.isSynchronous = true
fetchOption.deliveryMode = .highQualityFormat
PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width:130,height:130), contentMode: .aspectFit, options: fetchOption, resultHandler: { (img, nil) in
if let convert = UIImagePNGRepresentation(img!) {
You can’t perform that action at this time.