Selaa lähdekoodia

Fix a warning in demo app

onevcat 4 vuotta sitten
vanhempi
commit
c1e8937353
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      Demo/Demo/Kingfisher-Demo/SwiftUIViews/ListDemo.swift

+ 1 - 3
Demo/Demo/Kingfisher-Demo/SwiftUIViews/ListDemo.swift

@@ -30,10 +30,8 @@ import SwiftUI
 @available(iOS 14.0, *)
 struct ListDemo : View {
 
-    let index = 1 ..< 700
-
     var body: some View {
-        List(index) { i in
+        List(1 ..< 700) { i in
             ImageCell(index: i)
                 .frame(height: 300)
         }.navigationBarTitle(Text("SwiftUI List"), displayMode: .inline)