Skip to content

Instantly share code, notes, and snippets.

View iamraafay's full-sized avatar
👨‍💻

Mohammad Abdurraafay (Raafay) iamraafay

👨‍💻
View GitHub Profile
@iamraafay
iamraafay / UIImageView+Additions.swift
Last active January 16, 2023 10:09
UIImageView Caching
import UIKit
/*With GCD*/
extension UIImageView {
func loadImage(from url: URL?) {
guard let url = url else { return }
let cache = URLCache.shared
let request = URLRequest(url: url)
DispatchQueue.global(qos: .background).async {