Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericlewis/asyncanimatedimage
https://github.com/ericlewis/asyncanimatedimage
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ericlewis/asyncanimatedimage
- Owner: ericlewis
- License: mit
- Created: 2024-03-07T19:42:43.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-17T00:25:56.000Z (10 months ago)
- Last Synced: 2024-04-15T02:47:22.251Z (9 months ago)
- Language: Swift
- Size: 40 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Example
https://github.com/ericlewis/AsyncAnimatedImage/assets/674503/8347cc5a-6f0f-458a-845e-2463c0250980
```swift
import SwiftUI
import AsyncAnimatedImagelet url = URL(string: "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5d523adb8bbb4786821cd7091e47da21/default/dark/2.0")!
struct CellView: View {
var body: some View {
Text("CHOMPCHOMP: \(AsyncAnimatedImage(url: url))")
.drawingGroup() // this is useful when you are using lots of GIFs
}
}struct ContentView: View {
var body: some View {
List {
ForEach(0..<100) { _ in
CellView()
}
}
}
}@main
struct TestApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
```