Listã§çºçããã¨ã©ã¼ã®æå³Identifiableã«ã¤ãã¦èªãåã«ãã¾ãã¯ä¸ã«æ¸ããã¨ã©ã¼ã®æå³ã確èªãã¾ãããã å訳ããã¨ããã¤ãã·ã£ã©ã¤ã¶ã¼ init(_:rowContent:) ã¯ãxxxx ã identifiable ã«æºæ ãã¦ããå¿
è¦ãããã¾ãããã¨ããå
容ã«ãªãã¾ãã ãã®ã¨ã©ã¼ã¯ä¾ãã°ä»¥ä¸ã®ãããªå®è£
ãããã¨çºçãã¾ãã struct ContentView: View { let rows = ["abc","def","ghi"] var body: some View { List(rows){ row in Text(row) } } } ã§ã¯ãã®å®è£
ã¯ãªãã¨ã©ã¼ã«ãªã£ã¦ãã¾ãã®ã§ãããï¼ çç±ã¯Listã®æ§è³ªã«ããã¾ããListã®ãããªç¹°ãè¿ãå¦çã§ã³ã³ãã³ããä½ã£ãå ´åããã®ã³ã³ãã³ãã®ãã¼ã¿ãæ´æ°ããå¿
è¦ãåºãéã«ã©ã®ã³ã³ãã³ããæ´æ°ããã®ããSwif
{{#tags}}- {{label}}
{{/tags}}