how can i Displaying List in an Array ?
i have addressbook in that i have created some contacts in that i have entered 5 contacts in which i have entered phonenumbers
1st contact- one phone number
2nd contact- two phone number
3rd contact- three phone number
4th contact- no phone number
5th contact- no phone number
while i am getting this phone numbers i am storing in NSMutableArray n from that array i want to print that phone numbers in 3 UILabels which i have ceated in a view
while i am trying to print three contacts in three labels
alabel.text=[contactslist objectatindex:0];
ababel.text=[contactslist objectatindex:1];
clabel.text=[contactslist objectatindex:2];
while prinitng i am getting NSRangeException error...in some contacts i have one or two or null
so how can i print this array with all conditions satisfy for one or two or no contacts
please send me the code which will satisfy these conditions..
thanks in advance....
|