We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ec42f2 commit e239327Copy full SHA for e239327
RELEASE_NOTES.md
@@ -6,6 +6,7 @@
6
### ✨ New features
7
8
* `NavigationContext` is a new observable class.
9
+* `Image+Resized` is a new `Image` extension.
10
11
### 🗑 Deprecations
12
Sources/SwiftUIKit/Images/Image+Resized.swift
@@ -0,0 +1,18 @@
1
+//
2
+// Image+Resized.swift
3
+// SwiftUIKit
4
5
+// Created by Daniel Saidi on 2023-08-17.
+// Copyright © 2023 Daniel Saidi. All rights reserved.
+
+import SwiftUI
+public extension Image {
13
+ /// Resize the image with a certain content mode.
14
+ func resized(to mode: ContentMode) -> some View {
15
+ self.resizable()
16
+ .aspectRatio(contentMode: mode)
17
+ }
18
+}
0 commit comments