English 中文(简体)
能否与假装控制器调换由人组别的、由人主谈?
原标题:Is it possible to switch uitableviewgrouped and uitableviewplain with uisegmentedcontroller?
  • 时间:2009-09-22 07:20:29
  •  标签:

我正在开发一个有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){
   }
 }  
问题回答

暂无回答




相关问题
热门标签