(question in last post) 
Im try to assign a value to a cell in a matrix column and row to a specify
value; for example i would like the matrix to look like this:
-------------
|1|2|3|4|5|
--------------
|6|7|8|9|10|
--------------
i know i could do this wit this code:
the reason i dont want to do it this way is because each column is going to be assign a diffent value when a value eqaul a defferent value;
and i know i could do this by manually do it in IB by create a matrix there.
but i'm doing it manually by code.
i tryed this code:
this doesnt work
output
|0|1|2|3|4|
-------------
|1|
soo may you point me in the right direction?
thank you
Im try to assign a value to a cell in a matrix column and row to a specify
value; for example i would like the matrix to look like this:
-------------
|1|2|3|4|5|
--------------
|6|7|8|9|10|
--------------
i know i could do this wit this code:
Code:
int i;
for(i=1; i<=10; i++){
cell = [matrix cellAtRow:0 column:i-1];
[cell setTitle:[NSString stringWithFormat:@"%d",i]];
}
the reason i dont want to do it this way is because each column is going to be assign a diffent value when a value eqaul a defferent value;
and i know i could do this by manually do it in IB by create a matrix there.
but i'm doing it manually by code.
i tryed this code:
Code:
int c,r,i;
i=1;
while (i<=10) {
for(c=0; c<=5; c++){
cell = [matrix cellAtRow:0 column:c];
[cell setTitle:[NSString stringWithFormat:@"%d",c];
}
for(r=0; r<=2; r++){
cell = [matrix cellAtRow:r column:0];
[cell setTitle:[NSString stringWithFormat:@"%d",r]];
}
i++;
}
output
|0|1|2|3|4|
-------------
|1|
soo may you point me in the right direction?
thank you