---
title: "Discussion on \"SwiftUI图片调整小纸条\" | Hashnode"
description: "Discussion on \"SwiftUI图片调整小纸条\". 在SwiftPlayground中使用图片\n我们可以使用Image将一个图片放入SwiftUI的View中，如果图片在Swift Playgrounds的资源库中，可以使用Image(uiImage: UIImage(#imageLiteral(resourceName: \"young.jpg\")))这样来使用，如果我们不加任何修饰就会看到图片原始的样子：\n\n显然这两张图片无法完整的显示出来了。\nResizable\n我们可以使用 .resizable() 修饰符来调整图片大小。它会让图片撑满当前..."
url: "https://hashnode.com/posts/swiftui-image-resize-aspect-ratio/6273bff377679f3cf14d74d0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [SwiftUI图片调整小纸条](https://blog.hdcola.org/swiftui-image-resize-aspect-ratio?utm_source=hashnode&utm_medium=feed)

在SwiftPlayground中使用图片 我们可以使用Image将一个图片放入SwiftUI的View中，如果图片在Swift Playgrounds的资源库中，可以使用Image(uiImage: UIImage(#imageLiteral(resourceName: "young.jpg")))这样来使用，如果我们不加任何修饰就会看到图片原始的样子： 显然这两张图片无法完整的显示出来了。 Resizable 我们可以使用 .resizable() 修饰符来调整图片大小。它会让图片撑满当前...

May 5, 2022 · 1 min read · blog.hdcola.org  
Read the article

-   [#xcode](https://hashnode.com/tag/xcode)
-   [#swift](https://hashnode.com/tag/swift)
-   [#swiftui](https://hashnode.com/tag/swiftui)

## Written by

[老房东](https://hashnode.com/@hdcola)

@hdcola · Quebec CA

  
[View profile](https://hashnode.com/@hdcola)

Let's enjoy life

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
