なんとかするから、なんとかなる

エンジニア関係のことを書きます

2018-08-27から1日間の記事一覧

iOS ForEach構文でArrayのIndexを取得する

English version below https://hopita.hatenablog.com/entry/2018/08/27/210911 はじめに ForEach文でIndex番号が欲しいことはよくあるので、備忘録です。 解決方法 enumerated()メソッドを利用する for (index, value) in someArray.enumarated() { // な…

iOS How to get an index of array in for each sentence.

Introduction This article shows how to get an index in for each sentence. Solution Using enumarated method. You can get the index of array for (index, value) in someArray.enumarated() { // do something }