Reading time: 1 min
This quick recipe shows how to display an image from Assets catalog in SwiftUI.
Say that you've added your image to the Assets catalog:
All you have to do to render it on the screen is to pass its name to Image:
Image("logo_small")
Using Image(decorative:)
does the same thing.
Search our recipes
Related Posts
- 100 WebView in SwiftUI
- 100 Styling SwiftUI DatePicker
- 100 SwiftUI View to Image With ImageRenderer (Any Version)
- 100 Justify Text in SwiftUI
- 100 SwiftUI Request App Review (Any Version)
Check out the companion apps!
Our free companion app and XCode Extension brings 100+ SwiftUI recipes right at your fingertips! Get a preview of it in the Online Companion.
Have a recipe for us?
Get in touch and let's grow the cookbook together!