jellyflood/Shared/Extensions/ImageExtensions.swift
Kwangmin Bae 7c5a4441c1
Add Next Up Widgets (#43)
* WIP

* add EntryView UI

apply AppGroups
apply KeychainGroups

* update widget layout

* update widget layout

* Refactoring

add WidgetEnvironment
add snapshot logic
add placeholder

* fix

* fix team id

* pass ci?

* update keychain group

* Update PersistenceController.swift

Co-authored-by: Aiden Vigue <acvigue@me.com>
2021-06-10 01:05:52 -07:00

22 lines
568 B
Swift

/* SwiftFin is subject to the terms of the Mozilla Public
* License, v2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* Copyright 2021 Aiden Vigue & Jellyfin Contributors
*/
import Foundation
import SwiftUI
extension Image {
func centerCropped() -> some View {
GeometryReader { geo in
self
.resizable()
.scaledToFill()
.frame(width: geo.size.width, height: geo.size.height)
.clipped()
}
}
}