xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Swift comments All In One

Swift comments All In One

SwiftUI

single line comment

// 单行注释


comment block / multi lines comment

/*
多行注释

*/ 

demo


import SwiftUI

struct HuTongView: View {
  let hutongs: [HutongModel] = HutongData;
  var body: some View {
    ScrollView(.vertical, showsIndicators: false) {
      VStack() {
        Spacer();
        /*
        ForEach(hutongs) { item in
          // HutongRanking(hutong: item);
          HutongRanking(item);
        }
       */
        ForEach(hutongs) { hutong in
          HutongRanking(hutong);
        }
      }
    }
    //
    Text("HuTong 🏡")
      .padding()
      .foregroundColor(.accentColor)
  }
}

refs

https://github.com/xgqfrms/swift/



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-05-16 14:50  xgqfrms  阅读(29)  评论(1编辑  收藏  举报