【发布时间】:2014-07-18 06:08:37
【问题描述】:
我正在使用 xml 解析并将我的值存储在名为 fetchedobj 的数组中。现在我希望将数组 fetchedobj 中的值显示给 UILabel。
有五个 UILabel 并且单击一个按钮我希望五个值显示在五个 UILabel 上。下次单击时,值将递增,UILabels 应使用下一组五个值进行更新
for ( i=0; i<fetchedobj.count; )
{
n1.text=[[fetchedobj objectAtIndex:i]valueForKey:@"tag"];
n2.text=[[fetchedobj objectAtIndex:i]valueForKey:@"person"];
n3.text=[[fetchedobj objectAtIndex:i]valueForKey:@"place"];
n4.text=[[fetchedobj objectAtIndex:i]valueForKey:@"gENDER"];
n5.text=[[fetchedobj objectAtIndex:i]valueForKey:@"ph"];
i++;
}
使用此代码,最后一个人的详细信息会显示在 UILabel 上。请帮忙
【问题讨论】:
标签: ios objective-c