Swipe-That_pic/Swipe That Pic/Models/Extension.swift
2024-07-30 14:46:56 +02:00

17 lines
269 B
Swift

//
// Extension.swift
// Swipe That Pic
//
// Created by Amine Bou on 27/07/2024.
//
import Foundation
import Photos
extension Array {
func random() -> Element {
let randomIndex = Int(arc4random()) % self.count
return self[randomIndex]
}
}