开发者

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 ???

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜