【发布时间】:2011-02-28 21:16:01
【问题描述】:
我创建了一个自定义 UIView,并在该 UIView 中添加了一个 UITableView,如下所示:
treeView = [[UITableView alloc] initWithFrame:CGRectMake(0, 80, slider.frame.size.width, slider.frame.size.height - 80)];
[treeView setDelegate:self];
[treeView setDataSource:self];
[self addSubview:treeView];
[treeView release];
当应用加载时,表格似乎加载正常。但是,当我尝试滚动表格时,它根本不响应触摸。
我还实现了这些委托/数据源方法:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
有人知道为什么会这样吗?
谢谢
【问题讨论】:
标签: ipad ios uitableview iphone-sdk-3.0 ios4