在我的應用程序中我使用三個表視圖和數據來自web service.and在我的第一個表中只有一個數據來但它顯示整個表格。點擊第二個表格後會出現4個數據來顯示整個表格。如何使自定義tableview其中如果行是一個tableview也出現一行表
所以我想,如果數組數是什麼,根據我的表減少/增益大小它自己。
這裏是我的代碼:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if(rubrixTbl==tableView) //
{
if (str!=nil)
//*******here str is NSString abject.
{
return 1;
}
else
{
return 0;
}
} if (rubrixTbl2==tableView)
{
return [rubaricIDarr count];
//*****rebaricDarr is object of nsmutablearray********
}
if(rubrixTbl3==tableView)
{
return [table3Array count];
}
return 0;
}
你重新加載你的表嗎? – Rushabh
@Rushabh不,當我第一次來我的viewcontroller數據是在tableview ... – user3218052