问题,滚动型
问题描述:
可能重复里面的表视图:
issue with tableview in iphone问题,滚动型
我有以下几点:
.h文件中:
UITableView *catalogTable;
UIScrollView *scrollView;
。 m文件
- (void)viewDidLoad
{
NSLog(@"BoiteAOutils");
[super viewDidLoad];
catalogTable.backgroundColor = [UIColor clearColor];
catalogTable.layer.cornerRadius = 10.0;
scrollView.layer.cornerRadius = 15;
[self.view addSubview:scrollView];
[scrollView setShowsVerticalScrollIndicator:NO];
catalogTable.scrollEnabled = NO;
catalogTable.layer.cornerRadius = 15;
[scrollView addSubview:catalogTable];
nameCatalog = [myAudiAppDelegate sharedAppDelegate].dataHandler.catalogueList;
loadingView.hidden=YES;
}
我创建了一个scrollView
,并在xib
文件tableView
。 一切的伟大工程,结果看起来:
http://i53.tinypic.com/dzgqx3.png
我很haapy,结果,问题是,一旦我开始滚动表上下它不move.I可以”没有看到表格的全部内容......只有单元格显示在这张图片中。 我哪里错了?谢谢:)
答
你不应该把UITableView
放在UIScrollView
里面。引述documentation为UIScrollView
:
重要:你不应该嵌入 的UIScrollView对象的UIWebView或UITableView的对象。如果这样做,可能会导致意外的行为 ,因为两个对象的触摸事件可能混淆并且错误地处理了 。
你应该重新考虑你想要如何布局。希望有助于!