2013-10-14 33 views
0

我也有类似的网络调查问卷形式的场景,说我有表上3个问题:iOS的UI/UX建议需要有关动态隐藏和显示领域

一个 乙 Ç

只有B当我回答是肯定的质疑出现,C时,我回答是质疑B.

是否有关于如何实现这种UI的iOS上的任何指引才出现?或者我们只是简单地按照Web的方式来做iOS?因为我在iOS应用程序中没有看到这些示例。

感谢和问候

+6

这可能是在http://ux.stackexchange.com/更合适 – BergQuester

回答

1

一个相对简单的方式做,这是在一个UITableView并通过的UITableViewController。当用户回答每个问题时,可以通过添加一行来显示下一个问题。添加一行的代码如下,应该放在一个tableViewController中。

-(void)showNextRow:(int)row inSection:(int)section 
{ 
    NSArray *newRowIndexPath = @[[NSIndexPath indexPathForRow:row inSection:section]]; 

    UITableView *tv = (UITableView *)self.view; 
    [tv beginUpdates]; 
    [tv insertRowsAtIndexPaths: newRowIndexPath withRowAnimation:UITableViewRowAnimationFade]; 
    [tv endUpdates]; 
} 

您将需要跟踪的所有问题,并正在回答当前问题,将不得不使用保留以下功能最新

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 

并填充数据模型您UITableViewCells