Initial Commit

This commit is contained in:
aminecmi
2024-07-26 15:16:48 +02:00
parent 656680d19f
commit 9f51394788
20 changed files with 1135 additions and 0 deletions

View File

@ -0,0 +1,16 @@
//
// 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]
}
}

View File

@ -0,0 +1,17 @@
//
// Item.swift
// Swipe That Pic
//
// Created by Amine Bou on 26/07/2024.
//
import Foundation
import SwiftData
@Model
final class Item {
@Attribute(.unique) var localIdentfier: String
init(localIdentfier: String) {
self.localIdentfier = localIdentfier
}
}