2011-08-19 38 views

回答

0

在你UITableView委托方法:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    [tableView deselectRowAtIndexPath:indexPath animated:NO]; 
    [self.view addSubview:myView]; 
} 

这里,MyView的是,你必须IBOutlet视图。

在.h文件中

IBOutlet UIView *myView; 

让我知道,在任何困难的情况下,。

干杯。

+0

感谢它工作 – Thukaram

+0

,但你可以告诉我如何使用cellForRowAtIndexPath:内部表视图的方法 – Thukaram

0

是的,有一种行选择方法,你必须启动一个方法,创建尺寸较小的auiview,并在该视图表视图中作为子视图。 Plz指定要显示哪种类型或种类的弹出窗口。

+0

告诉我如何编写代码 – Thukaram

+0

我仍然天真的程序员 – Thukaram

0

好吧,我现在明白了。

应使用表视图的更新方法:

[myTableView beginUpdates]; 
NSArray *indexPaths = [NSArray arrayWithObjects: 
         [NSIndexPath indexPathForRow:0 inSection:1], 
         [NSIndexPath indexPathForRow:1 inSection:1], 
         [NSIndexPath indexPathForRow:2 inSection:1], 
         [NSIndexPath indexPathForRow:3 inSection:1],nil]; 
[myTableView insertRowsAtIndexPaths:indexPaths withRowAnation:UITableViewRowAnimationTop]; 
[myTableView endUpdates]; 
相关问题