iPhone: can i use NSString search in NSArray
can i use like this r not
for (NSString *string in userInfo){
lblUserName.text = (NSString *) [userInfo objectForKey:@"name"];
lblLocation.text = (NSString *) [userInfo objectForKey:@"location"];
lblDescription.text =(NSString *) [userInfo objectForKey:@"description"];
NSLog(@"User profileData Received:开发者_StackOverflow中文版 %@", userInfo);
}
here userInfo = NSArray (this is delegate i can change )
lblUserName = label name
ObectForKey is using for searching NSString
thank you, is this Right r wrong one
if not how i have to work out
NSArray are not key based but index based. Use NSDictionary instead or use index to retrieve items.
and I don't understand what is the loop for, you don't even use the string var in it ???
精彩评论