2012-06-04 12 views

Odpowiedz

17

wydaje masz tablicy tablic, więc byłoby:

[[myArray objectAtIndex:0] objectAtIndex:0]; 

lub używając indeksowanie:

myArray[0][0]; 

Edit:

Ok masz tablicę NSStrings. Aby zrobić to, co chcesz (dostać 53,399) wykonaj następujące czynności:

NSString *myString = [myArray objectAtIndex:0]; 
NSArray *stringComponents = [myString componentsSeparatedByString:@","]; 
NSString *myFinalString = [stringComponents objectAtIndex:0]; 

Z indeksowanie:

NSString *myFinalString = [[myArray[0] componentsSeparatedByString:@","][0]; 
+0

Dziękuję za odpowiedź. – SampathKumar

+0

NSLog (@ "Testowanie:% @", [[Array objectAtIndex: 0] objectAtIndex: 0]); – SampathKumar

+0

Wystąpił błąd - [__ NSCFString objectAtIndex:]: nierozpoznany selektor wysłany do instancji 0x1084a950 – SampathKumar

0

Można użyć

[[arrayObj objectAtIndex:0] objectAtIndex:0]; 
+0

dzięki na Twoją odpowiedź – SampathKumar

Powiązane problemy