You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Runvey/Runvey/ContentView.swift
+48-16Lines changed: 48 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -15,23 +15,48 @@ struct ContentView: View {
15
15
@StateprivatevargeneratedVideoURL:URL?
16
16
@StateprivatevarisLoading=false
17
17
@StateprivatevarerrorMessage:String?
18
+
@StateprivatevarimageSelection:PhotosPickerItem?
18
19
19
20
var body:someView{
20
21
NavigationStack{
21
22
VStack{
22
-
AsyncImage(url:URL(string:"https://images.unsplash.com/photo-1542051841857-5f90071e7989?q=80&w=3270&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wAWdlfHx8fGVufDB8fHx8fA%3D%3D")){ phase in
23
-
iflet image = phase.image {
24
-
image
25
-
.resizable()
26
-
.scaledToFit()
27
-
.cornerRadius(16)
28
-
}elseif phase.error !=nil{
29
-
Image(systemName:"exclamationmark.triangle")
30
-
.resizable()
31
-
.scaledToFit()
32
-
.foregroundColor(.red)
33
-
}else{
34
-
ProgressView()
23
+
iflet selectedImage = selectedImage {
24
+
Image(uiImage: selectedImage)
25
+
.resizable()
26
+
.scaledToFit()
27
+
.cornerRadius(16)
28
+
}else{
29
+
AsyncImage(url:URL(string:"https://images.unsplash.com/photo-1542051841857-5f90071e7989?q=80&w=3270&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wAWdlfHx8fGVufDB8fHx8fA%3D%3D")){ phase in
letpromptText="Dynamic tracking shot: The camera glides through the iconic Shibuya Crossing in Tokyo at night, capturing the bustling intersection bathed in vibrant neon lights. Countless pedestrians cross the wide intersection as towering digital billboards illuminate the scene with colorful advertisements. The wet pavement reflects the dazzling lights, creating a cinematic urban atmosphere."
0 commit comments