Comments (3)
The view doesn't know the size of the image before it downloads it. Thus, you must specify the view size before loading the image. By default, the image will resize preserving the aspect ratio to fill the available space. You can change this behavior by passing a different resizing mode.
LazyImage(source: "https://example.com/image.jpeg", resizingMode: .center)
.frame(height: 300)
from nukeui.
i'm not sure if we're talking about the same thing here. In my case i have a List
of LazyImage
s that are being set with an external aspect ratio, on the view itself - i believe this should force the image view container to have a particular height based on the requested aspect ratio, regardless of the final image result's size/aspect ratio (at least this is what applying aspect ratio to another type of view like Color
or Rectangle
etc does)
My issue in particular here is that by using List
instead of ScrollView
, not sure which of the following happens (or both?) : either the image "spills" outside its container, or the height of the image container is not set based on the aspect ratio modifier after it
from nukeui.
Try using LazyVGrid or LazyHGrid instead and put it inside a scroll view.
Also use LazyHstack or LazyVStack.
Use frame sizing on the lazy image and/or stacks
from nukeui.
Related Issues (20)
- Question: How can we stop animations when image is displayed. HOT 2
- Can we add play and pause buttons to the video playback? HOT 3
- Add support for iOS 13 HOT 1
- Placeholder image always displayed before cached image on iOS 15 when using an animation modifier
- LazyImage and memory usage HOT 2
- Read Image Data
- Image goes black when using SwiftUI contextMenu HOT 2
- Nothing shows when using content closure & url points to a video HOT 1
- Issue loading gif HOT 1
- Crash IOS 14.4 HOT 2
- Randomly, image does not load HOT 12
- To not set const image height
- Failed to decode image HOT 1
- Unable to change default view/color while image is loading HOT 1
- NukeUI + Introspect issue HOT 5
- MP4 loop stops when app is put in background HOT 2
- [Question] Disk caching between sessions? HOT 2
- Dependency on Gifu HOT 1
- Unable to add package HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nukeui.