An open API service indexing awesome lists of open source software.

https://github.com/cuadros-code/project-10-swiftui-order-cupcake

Project 10 internet data
https://github.com/cuadros-code/project-10-swiftui-order-cupcake

Last synced: 8 months ago
JSON representation

Project 10 internet data

Awesome Lists containing this project

README

          

# Project 10

- async / await
- .task
- AsyncImage
- .sensoryFeedback
- CHHapticEngine
- import CoreHaptics
- Task

### Load Image
```swift
AsyncImage(url: URL(string: "https://hws.dev/img/logo.png"), scale: 3)

AsyncImage(url: URL(string: "https://hws.dev/img/logo.png"), scale: 3) { image in
image
.resizable()
.scaledToFit()
} placeholder: {
Text("Loading...")
}

AsyncImage(url: URL(string: "https://hws.dev/img/logo.png")) { phase in
if let image = phase.image {
image
.resizable()
.scaledToFit()
} else if phase.error != nil {
Text("There was an error loading the image.")
} else {
ProgressView()
}
}
.frame(width: 200, height: 200)
```

---
## Force Encode properties
```swift
@Observable
class User: Codable {
enum CodingKeys: String, CodingKey {
case _name = "name"
}
var name = "Taylor"
}
```