custom explore page + api
This commit is contained in:
1 parent
5a94ea73d9
commit
4d6b093ffd
10 files changed
+415
-49
No files matched your search
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// URLCache+imageCache.swift
|
||||
// Cowabunga
|
||||
//
|
||||
// Created by sourcelocation on 02/02/2023.
|
||||
//
|
||||
|
||||
import CachedAsyncImage
|
||||
import Foundation
|
||||
|
||||
extension URLCache {
|
||||
|
||||
static let imageCache = URLCache(memoryCapacity: 512*1000*1000, diskCapacity: 10*1000*1000*1000)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// CornerRadius++.swift
|
||||
// Cowabunga
|
||||
//
|
||||
// Created by sourcelocation on 30/01/2023.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
extension View {
|
||||
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
|
||||
clipShape( RoundedCorner(radius: radius, corners: corners) )
|
||||
}
|
||||
}
|
||||
|
||||
struct RoundedCorner: Shape {
|
||||
|
||||
var radius: CGFloat = .infinity
|
||||
var corners: UIRectCorner = .allCorners
|
||||
|
||||
func path(in rect: CGRect) -> Path {
|
||||
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
|
||||
return Path(path.cgPath)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user