-5
我使用xml解析並將我的值存儲在數組中,名爲fetchedobj。現在我想要將數組fetchedobj中的值顯示給UILabel。如何設置NSArray值爲UILabel
有五個UILabels,並點擊一個按鈕,我想要五個值顯示在五個UILabels上。在下次點擊值將遞增,並UILabels應與下一組使用此代碼最後一個人的細節顯示在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++;
}
的更新。 PLZ幫助
請發表評論的原因嗎? – Yogendra