Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Xcode 7.3 の最近の更新から、このメッセージが表示されるようになりました。以下のようにループ内のシーケンスを使用しています。
for (index, product) in EnumerateSequence(self.products) { //Do something with the product //Do something with the index }
メモは にありEnumerateSequenceます。
EnumerateSequence
いくつかのテストの後、これは Swift 2.2 以降でindexと の両方を使用する場合に使用するソリューションobjectです。
index
object
for (index, product) in self.products.enumerate() { //Do something with the product //Do something with the index }
メソッドを削除EnumerateSequenceして使用するArray.enumerate()
Array.enumerate()