我正在开发一个有segmented control的电话,其中附有与书籍等内容有关的细节。
我想用uitableviewplain风格展示书本。
但现在我想到另一个部分,它应当用uitableviewgrouped展示书商的详细情况。
如何将这些意见与分散的控制者联系起来,并用数据来源和代议方法加以确定。
我正在开发一个有segmented control的电话,其中附有与书籍等内容有关的细节。
我想用uitableviewplain风格展示书本。
但现在我想到另一个部分,它应当用uitableviewgrouped展示书商的详细情况。
如何将这些意见与分散的控制者联系起来,并用数据来源和代议方法加以确定。
It seems that the simplest way to do that is to create two UITableViews for each purpose and show/hide them according to segmented control value. In delegate and data source methods just check what tableview are you using, like:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (tableView == plainView){
}
if (tableView == groupView){
}
}