ios - How to use [for] to list all elements in 2 dimensional NSArray? -


I need to calculate on 2 dimensional NSArray . I did not understand how to scroll through NSArray as I understand NSArray is only 1 dimensional, so I think scroll through the rows and each The line must be changed again in NSArray . And remove the elements inside it with the index inside the column.

My code is below

  (id object in myArray) {i ([Object [6] intValue] == 1) {sumAmount + = [Object [3] intValue]; }}  

A "two-dimensional" array is just an array of arrays, so you For your loops like this:


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -