Any way to iterate a tuple in swift?

后端 未结 6 662
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 15:24

I am curious how to do a for loop with a tuple in swift.

I know that to access each member you can use dot notation using the index number

var tuple         


        
6条回答
  •  时光取名叫无心
    2020-12-04 16:17

    No, you can't. The reason is that tuple items are not all required to have the same type, so you would not be able to know what type each should have.

提交回复
热议问题