1

my array contains some strings..

array[0]=abs
array[1]=1234
array[2]=183
array[3]=1534

array[4]=pqr
array[5]=123
array[6]=134
array[7]=14

array[8]=aas
.
.
.

I placed this array in UITableView and and it shows output like this

abs
1234
183
1534
pqr
123
134
aas
.
.
.

then I created four labels programmatically in UITableView now I want to map

array[0] with first label
array[1] with second label
array[2] with third label
array[3] with four label

when array[4] comes it should map with first label and array[5] with second label and so on... how should i do this in objective c ?

Code cracker
  • 3,105
  • 6
  • 37
  • 67
  • I wrote an answer on a similar question here : http://stackoverflow.com/questions/7710795/how-to-create-uitableview-like-grid-in-landscape-mode/7714483#7714483. The key is to define tags on your labels and use viewWithTag to retrieve them. – gregory Dec 06 '11 at 18:13
  • can i have your email id plz ? i will mail my code to you edit it and mail me back plz dude, m very new to iPad so didn't have much knowledge..plz –  Dec 07 '11 at 04:36
  • how should i create four labels in each cell of tableview ? –  Dec 07 '11 at 06:22

1 Answers1

0

you have to use tag of the label and depending on the tag, insert the data.

GAMA
  • 5,958
  • 14
  • 79
  • 126