Browse Source

Fix a warning in demo app

onevcat 4 years ago
parent
commit
c1e8937353
1 changed files with 1 additions and 3 deletions
  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, *)
 @available(iOS 14.0, *)
 struct ListDemo : View {
 struct ListDemo : View {
 
 
-    let index = 1 ..< 700
-
     var body: some View {
     var body: some View {
-        List(index) { i in
+        List(1 ..< 700) { i in
             ImageCell(index: i)
             ImageCell(index: i)
                 .frame(height: 300)
                 .frame(height: 300)
         }.navigationBarTitle(Text("SwiftUI List"), displayMode: .inline)
         }.navigationBarTitle(Text("SwiftUI List"), displayMode: .inline)